caffe-yolo
caffe-yolo copied to clipboard
"ValueError: cannot reshape array" while running create_yolo_caffemodel.py
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.
i get the same error i think that numpy is not able to convert the yolo to caffe model
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.