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

Please provide to Input either a shape or a batch_shape argument. Note that shape does not include the batch dimension. #22

Open
abdulqayyum opened this issue Dec 1, 2016 · 2 comments

Comments

@abdulqayyum
Copy link

Hi MarcBS, I am trying to convert this model, at first I got error that no module fft found for from theano.tensor.fft import ifft in backend/theano_backend.py even though import theano.tensor was working, So I commented this line thinking it was of no use (edge of being novice -- Itried adding path and installing theano apart from keras(origional) etc)
After that following error came up while I do not think there is any shape argument required (please note that .caffemodel file is also named 'keras' only )

qayyum@qayyum:~/keras/keras/caffe$ python caffe2keras.py -load_path '/home/qayyum/colorization/' -prototxt 'colorization_deploy_v2.prototxt' -caffemodel 'keras' Using Theano backend. Converting model... CREATING MODEL Traceback (most recent call last): File "caffe2keras.py", line 45, in <module> main(args) File "caffe2keras.py", line 34, in main model = convert.caffe_to_keras(args.load_path+'/'+args.prototxt, args.load_path+'/'+args.caffemodel, debug=args.debug) File "/home/qayyum/keras/keras/caffe/convert.py", line 43, in caffe_to_keras debug) File "/home/qayyum/keras/keras/caffe/convert.py", line 149, in create_model net_node[layer_nb] = Input(shape=dim, name=name) File "/home/qayyum/keras/keras/engine/topology.py", line 1083, in Input 'shapedoes not include the batch ' AssertionError: Please provide to Input either ashapeor abatch_shapeargument. Note thatshapedoes not include the batch dimension.

@lvapeab
Copy link
Collaborator

lvapeab commented Dec 1, 2016

Referring to the theano.tensor.fft module, it was included in version 0.9.X of Theano. Please make sure you are using an updated version of Theano (see bleeding edge installation instructions here).

Regarding the other error, @MarcBS will probably give you a better answer than me :)

@abdulqayyum
Copy link
Author

@lvapeab I am using theano 0.9 as I recognized later, it is not bleeding edge though

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