GRUV icon indicating copy to clipboard operation
GRUV copied to clipboard

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

Open p0123n opened this issue 8 years ago • 3 comments

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?

p0123n avatar Mar 18 '16 08:03 p0123n

Having same issue here as well.

christopher-beckham avatar Mar 20 '16 17:03 christopher-beckham

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.

chun-hao avatar Mar 29 '16 19:03 chun-hao

Thanks for @chun-hao, It works now.

LuZhouheng avatar Apr 17 '16 04:04 LuZhouheng