chuanqi305 / MobileNetv2-SSDLite

Caffe implementation of SSD and SSDLite detection on MobileNetv2, converted from tensorflow.
MIT License
448 stars 231 forks source link

Error when creating deploy.caffemodel with two classes using load_caffe_weights.py, ValueError: cannot reshape array of size 157248 into shape (6,576,1,1) #24

Open chinthysl opened 6 years ago

chinthysl commented 6 years ago

dump_tensorflow_weights.py works well with the downloaded ssdlite_mobilenet_v2_coco_2018_05_09 model. But stuck at converting it to caffe model using the load_caffe_weights.py script

Traceback (most recent call last): File "load_caffe_weights.py", line 82, in load_data(net_deploy) File "load_caffe_weights.py", line 74, in load_data net.params[key][0].data[...] = load_weights(prefix + '_weights.dat', net.params[key][0].data.shape) File "load_caffe_weights.py", line 17, in load_weights weights = np.fromfile(path, dtype=np.float32).reshape(shape) ValueError: cannot reshape array of size 157248 into shape (6,576,1,1)

baiboat commented 6 years ago

did you fixed this error,i got the same error

tringn commented 6 years ago

I got same Error. Did you fix it?

chinthysl commented 6 years ago

@baiboat @tringn please look at the #22 I continued my work with MobileNetV1. Stopped at this error. Ha vent tried yet with solutions in #22