Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot generate new lyrics #20

Closed
littlevoices opened this issue Feb 28, 2018 · 4 comments
Closed

Cannot generate new lyrics #20

littlevoices opened this issue Feb 28, 2018 · 4 comments

Comments

@littlevoices
Copy link

littlevoices commented Feb 28, 2018

I'd love to test the program but unfortunately I'm getting errors when I try to generate a new lyrics even with the default settings (as in without training it with new lyrics).

File "model.py", line 300, in <module> main(depth, train_mode) File "model.py", line 277, in main model = create_network(depth) File "model.py", line 29, in create_network model.load_weights(str(artist + ".rap")) File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 2701, in load_weights import h5py

I have tested it on a virtual environment and native, on a mac and on a linux (Ubuntu) but I'm getting the same error.
I'm using:
Python 2.7
Tensorflow 1.4.1
Keras 1.2.2
numpy 1.12.1

Any idea of what could be the cause of that?

@robbiebarrat
Copy link
Owner

robbiebarrat commented Feb 28, 2018

looks like you don't have h5py installed - sudo pip install h5py

@littlevoices
Copy link
Author

That solved part of the issue, thanks
However now I run into this problem:
`=========
Total params: 2,248
Trainable params: 2,248
Non-trainable params: 0


Traceback (most recent call last):
File "model.py", line 300, in
main(depth, train_mode)
File "model.py", line 277, in main
model = create_network(depth)
File "model.py", line 29, in create_network
model.load_weights(str(artist + ".rap"))
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 2708, in load_weights
self.load_weights_from_hdf5_group(f)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 2781, in load_weights_from_hdf5_group
' elements.')
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.

@littlevoices
Copy link
Author

I fixed the problem by upgrading to Keras 2.0.2
Thanks Robbie, I love what you have done :)

@robbiebarrat
Copy link
Owner

glad you got it fixed, and glad that you liked it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants