robbiebarrat / rapping-neural-network

Rap song writing recurrent neural network trained on Kanye West's entire discography
1.04k stars 167 forks source link

Error in running model.py #19

Closed lima12345 closed 5 years ago

lima12345 commented 6 years ago

When I try to generate the lyrics, I get the error:

ValueError: Layer #0 (named "lstm_1" in the current model) was found to correspond to layer lstm_1 in the save file. However the new layer lstm_1 expects 12 weights, but the saved weights have 3 elements.

How can I correct this?

robbiebarrat commented 6 years ago

make sure that your versions correspond correctly.

Keras==1.2.2
numpy==1.12.1

you can do so by opening a python shell, typing import keras and then keras.__version__ - same for numpy.

lima12345 commented 6 years ago

Even after I make sure my versions correspond, I am still getting this error.

Omkar1206 commented 6 years ago

Yeah even I am getting the same error, but I am using python3 instead of 2. Is that the problem?

peterw commented 6 years ago

Did you guys manage to fix the issue?

Omkar1206 commented 6 years ago

Nope!

ak9250 commented 5 years ago

gettin the same error using python 2 in google colab here in the notebook https://colab.research.google.com/drive/1ezq8WgQxahTgnRB5qAF6EqlpmMgtsmIB

robbiebarrat commented 5 years ago

Here's a colab notebook I made that runs the network; will add this to the readme in a second.

https://goo.gl/GHSWzZ

ak9250 commented 5 years ago

Awesome thanks Robbie, one issue I ran into the notebook you linked is the main(depth) should be run after its defined, pushed that cell down after making a copy of yours and seems to be running fine now in this notebook https://colab.research.google.com/drive/1tTknOR6jI2ZxCtMCcyWaGoko-i6yTUVy

robbiebarrat commented 5 years ago

aah sorry - i wrote that for a class I'm TAing and i put the huge cell at the bottom so they wouldn't have to scroll past it... I'll move it right now.