xxradon / ONNXToCaffe

pytorch -> onnx -> caffe, pytorch to caffe, or other deep learning framework to onnx and onnx to caffe.
158 stars 33 forks source link

ONNX node of type Shape is not supported! Shape_167 Shape #20

Open Aruen24 opened 2 years ago

Aruen24 commented 2 years ago

Conv_165 Conv BatchNormalization_166 BatchNormalization Shape_167 Shape Traceback (most recent call last): File "convertCaffe.py", line 122, in convertToCaffe(graph, opset_version, prototxt_path, caffemodel_path) File "convertCaffe.py", line 64, in convertToCaffe err.unsupported_op(node) File "/home/wyw/ONNXToCaffe/onnx2caffe/_error_utils.py", line 36, in unsupported_op "ONNX node of type {} is not supported.\n".format(node.op_type,) TypeError: ONNX node of type Shape is not supported.

onnxsim简化后 I0323 10:09:59.523739 1970 net.cpp:84] Creating Layer Mul_56 I0323 10:09:59.523746 1970 net.cpp:406] Mul_56 <- 430_Conv_47_0_split_1 I0323 10:09:59.523754 1970 net.cpp:406] Mul_56 <- 438 I0323 10:09:59.523763 1970 net.cpp:380] Mul_56 -> 439 F0323 10:09:59.523782 1970 scalelayer.cpp:92] Check failed: bottom[0]->shape(axis + i) == scale->shape(i) (56 vs. 1) dimension mismatch between bottom[0]->shape(2) and scale->shape(2) Check failure stack trace: Aborted

zws98 commented 2 years ago

Conv_165 Conv BatchNormalization_166 BatchNormalization Shape_167 Shape Traceback (most recent call last): File "convertCaffe.py", line 122, in convertToCaffe(graph, opset_version, prototxt_path, caffemodel_path) File "convertCaffe.py", line 64, in convertToCaffe err.unsupported_op(node) File "/home/wyw/ONNXToCaffe/onnx2caffe/_error_utils.py", line 36, in unsupported_op "ONNX node of type {} is not supported.\n".format(node.op_type,) TypeError: ONNX node of type Shape is not supported.

onnxsim简化后 I0323 10:09:59.523739 1970 net.cpp:84] Creating Layer Mul_56 I0323 10:09:59.523746 1970 net.cpp:406] Mul_56 <- 430_Conv_47_0_split_1 I0323 10:09:59.523754 1970 net.cpp:406] Mul_56 <- 438 I0323 10:09:59.523763 1970 net.cpp:380] Mul_56 -> 439 F0323 10:09:59.523782 1970 scalelayer.cpp:92] Check failed: bottom[0]->shape(axis + i) == scale->shape(i) (56 vs. 1) dimension mismatch between bottom[0]->shape(2) and scale->shape(2) Check failure stack trace: Aborted

Have u solved it?