onnx2caffe
onnx2caffe copied to clipboard
KeyError: when run the demo
Hi, when running
python convertCaffe.py ./model/MobileNetV2.onnx ./model/MobileNetV2.prototxt ./model/MobileNetV2.caffemodel
it returns a KeyError.
File "convertCaffe.py", line 108, in <module>
convertToCaffe(graph, prototxt_path, caffemodel_path)
File "convertCaffe.py", line 88, in convertToCaffe
converter_fn(net, node, graph, err)
File "/root/projects/onnx2caffe/onnx2caffe/_weightloader.py", line 44, in _convert_BatchNorm
np.copyto(net.params[node_name + '_bn'][0].data, mean, casting='same_kind')
KeyError: u'287_bn'
And my settings are as follow:
python=2.7.14
onnx= 1.12.1
torch=0.4.0
caffe=1.1.6