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

"ValueError: cannot reshape array" while running create_yolo_caffemodel.py #26

Open
therealanshuman opened this issue May 11, 2017 · 2 comments

Comments

@therealanshuman
Copy link

therealanshuman commented May 11, 2017

I was trying to run create_yolo_caffemodel.py on yolo_train_val.prototxt and yolov1.weights. However, I am getting the following error -

Traceback (most recent call last): File "create_yolo_caffemodel.py", line 113, in <module> main(sys.argv[1:]) File "create_yolo_caffemodel.py", line 92, in main net.params[pr][0].data[...] = np.reshape(netWeights[count:count+weightSize], dims) File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 232, in reshape return _wrapfunc(a, 'reshape', newshape, order=order) File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc return getattr(obj, method)(*args, **kwds) ValueError: cannot reshape array of size 134094654 into shape (4096,50176)

What seems to be causing this error?
PS - I have not changed anything and just trying to run exactly what's given in the README.

@riadhayachi
Copy link

i get the same error i think that numpy is not able to convert the yolo to caffe model

@therealanshuman
Copy link
Author

I think there might some differences between the architecture given in yolo_train_val.prototxt and the one used in darknet which gave the corresponding weights as yolov1.weights on training.

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