I trained the model from the Music Generation project on Google Colab. It took about 2 hours. I downloaded the file, but on trying to upload it in the Jupyter Notebook, I get the following error.
Cannot load Keras LSTM Model weights file
hey @Jalaanchal-Tewari-1816244721737412 ,
Kindly clear this out , are loading only weights or a model ?
as it also depends upon what you saved.
Thank You
.
give it a try by just using load_weights to your model
Thank you. load_weights worked but now I have encountered a new problem. I cannot generate any other note/chord during prediction other than ‘C5’.
I’m attaching the link for the folder containing the Jupyter Notebook, the LSTM Model weights file and the ‘notes’ file used in data preprocessing.
https://drive.google.com/drive/folders/1aSzWbjsoemZ93rK72hiaa1YuQMyn_emR?usp=sharing
The dataset I used was all the Beethoven piano songs downloaded from the zip folder link from this URL :
http://www.piano-midi.de/beeth.htm
what was the validation score ?
Did you checked that your model is learning well ? isn’t it getting overfitted ?
I thought the model was overfitting. So I used 3 callbacks and retrained the model.
The final loss and val_loss are shown in the image.
But now, instead of ‘C5’, all the model predicts is ‘D5’. Why is it still getting overfitted? The model already has 3 dropout layers.
From the above plot you provided it is clear that it is getting overfitted. But to confirm it again ,
can you please provide the full plot showing its training for arounf 30-40 epochs and its result on validation data.
also do one thing , change the learning rate of you optimizer to 0.00001 and then run.
I hope this helps.
See it clearly shows from the point it is going away from the normal loss trend. That your model is getting overfitted.
So this generally not happens , so i would say try to gather more data. Or instead of neural network try using conventional machine learning algorithms , may be they work much better than this.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.





