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

Error in sequence_generator on "Step 1": type assertion error #13

Open
p0123n opened this issue Mar 18, 2016 · 3 comments
Open

Error in sequence_generator on "Step 1": type assertion error #13

p0123n opened this issue Mar 18, 2016 · 3 comments

Comments

@p0123n
Copy link

p0123n commented Mar 18, 2016

Hi, can you help me please, seems like there is something went wrong while running generation:

python generate.py
Using Theano backend.
Loading training data
Finished loading training data
Starting generation!
Traceback (most recent call last):
  File "generate.py", line 59, in <module>
    sequence_length=max_seq_len, data_variance=X_var, data_mean=X_mean)
  File "/home/p0123n/projects/GRUV/gen_utils/sequence_generator.py", line 14, in generate_from_seed
    seedSeqNew = model._predict(seedSeq) #Step 1. Generate X_n + 1
  File "/usr/local/lib/python2.7/site-packages/keras/backend/theano_backend.py", line 383, in __call__
    assert type(inputs) in {list, tuple}
AssertionError

theano_backend.py wants to get one of "list" or "tuple" type, but gets "numpy.ndarray".
Running generate.py on current master (rev 2dc0895) after convert_directory.py and then train.py with custom mp3 sample.

Software versions:

  • Theano 0.7.0
  • Keras 0.3.2
  • NumPy 1.10.4
  • SciPy 0.17.0
  • Python 2.7.11

Do you have any ideas how to fix it?

@christopher-beckham
Copy link

Having same issue here as well.

@chun-hao
Copy link

I have the same error. I just go to line 13 of GRUV_master/gen_utils/sequence_generator.py and delete "_" in "seedSeqNew = model._predict(seedSeq) ". I don't know the reason why this problem occurs, but it works for me now.

@LuZhouheng
Copy link

Thanks for @chun-hao, It works now.

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

4 participants