Open RoiArthurB opened 5 years ago
Did you change the code at all?
If not, maybe updating keras or tensorflow might help:
pip3 install --upgrade keras tensorflow
Exactly same problem here,too.. :(
I might have found a solution.
Whenever your network finishes an epoch, it saves it weights to a new file, called something like 'weights-improvement-11-2.9103-bigger.hdf5'
. These weights are what you want to generate a new midi. The file predict.py
however, always loads in the same weights: Line 70: model.load_weights('weights.hdf5')
. That is why you're getting an error.
You should be able to run the network with any number of nodes, be it 512, 256 or even 2048. You have to load in the correct weights for that, however. What I did as a temporary solution is copy the name of the newly-generated weight file, and paste it into line 70 before generating a new midi. This works, but it isn't exactly elegant. Hopefully there'll be some kind of fix soon.
I had the same problem too and this problem can also be caused because of the difference between the notes that you currently have while making the training and the notes file from Skuldur's repository. In case if you are using the notes file from the repository, try to create your own notes file and see if that works.
So after running lstm.py
several weights weights-improvement-......
are outputted in the classical-piano-composer folder. Do you copy the name of the recent weight and replace it here model.load_weights('weights.hdf5')
?
I'm using Python3 on Windows 10 and after training my network, I try to run predict.py and I have this error message :