Music generation with Keras and LSTM
- Jupyter Notebook
- Python3.7
mido==1.2.9
tensorflow==1.14.0
Keras==2.1.2
sklearn==0.0
numpy==1.17.3
Check Jupyter Notebook
Music generation with Keras and LSTM
Music generation with Keras and LSTM
mido==1.2.9
tensorflow==1.14.0
Keras==2.1.2
sklearn==0.0
numpy==1.17.3
Check Jupyter Notebook
ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 1 array(s), but instead got the following list of 8734 arrays: [array([[-0.61290323, 0.42222222]
it is laocation is about line 101 i have no idea how to fix it
#line 99 mid = MidiFile()
#line100 track = MidiTrack()
#line 101
#line 102 t = 0
Hi dude,
First of all thanks a lot for your work. Now I wanted to ask you if it would be possible for you to provide more information on each chunk of code in the notebook of your repo ?
Thanks !
Regards,
While training, the loss is NaN
all the time. Logging the code in the earlier steps, I figured that the combine
variable you are using to combine notes and velocities has a NaN
in every element.
It becomes NaN after this block:
note_min = np.min(notes)
note_max = np.max(notes)
velocities_min = np.min(velocities)
velocities_max = np.max(velocities)
for i in combine:
i[0] = 2*(i[0]-((note_min+note_max)/2))/(note_max-note_min)
i[1] = 2*(i[1]-((velocities_min+velocities_max)/2))/(velocities_max-velocities_min)
combine
new value:
[[-0.3333333333333333, nan],
[0.3333333333333333, nan],
[-0.3888888888888889, nan],
[0.2777777777777778, nan],
[-0.5, nan],
[0.16666666666666666, nan],
[-0.6111111111111112, nan],
...,
...,
...,
]
Caused by division by 0. (velocities_min
is equal to velocities_max
, so their difference becomes 0.)
I downloaded the midis generated here, Generated_song_epoch=10.mid but they were empty
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.