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

Caffe2keras.py: ValueError: need more than 3 values to unpack in convert.py #61

Open
rubeea opened this issue Jan 20, 2020 · 0 comments

Comments

@rubeea
Copy link

rubeea commented Jan 20, 2020

Hi, I tried running the caffe2keras.py file to convert sample caffe model in the project (bvlc_googlenet.caffemodel) using CNTK backend with python 2.7. I get the following error upon running it:

Traceback (most recent call last):
File "caffe2keras.py", line 50, in
main(arguments)
File "caffe2keras.py", line 36, in main
debug=args.debug)
File "C:\Users\rubee\PycharmProjects\kerastest\keras\caffe\convert.py", line 50, in caffe_to_keras
tuple(input_dim[1:]), debug)
File "C:\Users\rubee\PycharmProjects\kerastest\keras\caffe\convert.py", line 300, in create_model
net_node[layer_nb] = LRN2D(alpha=alpha, k=k, beta=beta, n=n, name=name)(input_layers)
File "C:\Users\rubee\PycharmProjects\kerastest\venv\lib\site-packages\keras\engine\base_layer.py", line 460, in call
output = self.call(inputs, **kwargs)
File "C:\Users\rubee\PycharmProjects\kerastest\keras\caffe\extra_layers.py", line 26, in call
b, ch, r, c = input_dim
ValueError: need more than 3 values to unpack

According to this my input_dim array should have 4 dimensions. But it only has 3 dimensions according to the shape input that is (3,500,500). Can you kindly help me out what is wrong over here and what should be the 4th dimension.

Any help in this regard will be highly appreciated.

Looking forward to hear from you.

Regards,
Rabeea

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

1 participant