gklz1982 / caffe-yolov2

Other
164 stars 128 forks source link

About “ERROR : size mismatch”, why I can't get the output of .caffemodel? #30

Open c936637238 opened 5 years ago

c936637238 commented 5 years ago

when I run convert_weights_to_caffemodel.py,the final result is like this


scale22(scale)
conv23(conv)
ERROR: size mismatch: 50588936

SO I add a line in the end of convert_weights_to_caffemodel.py , like this

if np.prod(netWeights.shape) != count:
    print "ERROR: size mismatch: %d" % count
    print np.prod(netWeights.shape)
else:
    print "you are right."
    net.save(caffemodel_filename)

the resule is

scale22(scale)
conv23(conv)
ERROR: size mismatch: 50588936
50588937

Why do these two numbers differ by 1? How can I fix this problem?

shiva13425 commented 5 years ago

Hi @c936637238 .. I too met with similar issue. Kindly share your comments so it will be helpful. Thank you