caffe-yolo icon indicating copy to clipboard operation
caffe-yolo copied to clipboard

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

Open therealanshuman opened this issue 7 years ago • 2 comments

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.

therealanshuman avatar May 11 '17 06:05 therealanshuman

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

riadhayachi avatar May 18 '17 14:05 riadhayachi

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.

therealanshuman avatar May 19 '17 06:05 therealanshuman