1. 程式人生 > >Coursera 吳恩達DeepLearning.AI 第五課 sequence model 序列模型 第一週 Improvise a Jazz Solo with an LSTM Network

Coursera 吳恩達DeepLearning.AI 第五課 sequence model 序列模型 第一週 Improvise a Jazz Solo with an LSTM Network

We have taken care of the preprocessing of the musical data to render it in terms of musical "values." You can informally think of each "value" as a note, which comprises a pitch and a duration. For example, if you press down a specific piano key for 0.5 seconds, then you have just played a note. In music theory, a "value" is actually more complicated than this--specifically, it also captures the information needed to play multiple notes at the same time. For example, when playing a music piece, you might press down two piano keys at the same time (playng multiple notes at the same time generates what's called a "chord"). But we don't need to worry about the details of music theory for this assignment. For the purpose of this assignment, all you need to know is that we will obtain a dataset of values, and will learn an RNN model to generate sequences of values.

Our music generation system will use 78 unique values. Run the following code to load the raw music data and preprocess it into values. This might take a few minutes.