jamesmf / mnistCRNN

Simple TimeDistributed() wrapper Demo in Keras; sums images of MNIST digits
61 stars 24 forks source link

Error in 'collapsetime' #2

Closed arielephrat closed 8 years ago

arielephrat commented 8 years ago

Thanks so much for publishing this code!

When trying to run your code, I get the following error: *TypeError: unsupported operand type(s) for : 'NoneType' and 'int'**

This is because in the following line within 'collapsetime' newshape = [np.prod(x.get_shape()[0:2].as_list()),] + x.get_shape()[2:].as_list() the result of x.get_shape()[0:2].as_list() is [None,8] which produces the above error when trying to compute the product of both list elements.

Am I missing something here?

Thanks!

jamesmf commented 8 years ago

1) Have you added the file theano_backend.py to /keras/backend/ in your site-packages, as in the keras-extra documentation?

2) What versions of Keras and Theano are you using?This is currently only tested for Keras==0.3.1 and Theano==0.8.0

arielephrat commented 8 years ago

Sorry about that. I didn't realize it was only tested using Theano backend. In any case, it works now. Thanks!