keras nb_samples, timesteps, input_dim

828 Views Asked by At

I am working on my first LSTM in keras. I intend to train a NN to generate piano music. I have input data (notes) which I encode with integers. The input data after reading from the text files and encoding looks like this for a single piece of music.

TimeStep'\t'Voice1'\t'Voice2'\t'Voice3'\t'Voice4

1'\t'33'\t'55'\t'97'\t'12

2'\t'71'\t'26'\t'83'\t'42

3 ....

I have several pieces of music with different number of TimeStep (usually hundreds of time steps in each piece of music). Each piece can have different number of voices (columns). I was thinking of just combining all files together into one giant sequence of music (time step) and padding missing voices with 0 in order to train the network (all pieces are from the same composer, so I hope to capture the essence of this particular composer with this approach). Any thoughts on this approach are highly appreciated :)

How does this data best translate into the keras input format (nb_samples, timesteps, input_dim) and output format?

Thanks a lot for your help!

Michael

0

There are 0 best solutions below