onnx / onnxmltools

ONNXMLTools enables conversion of models to ONNX
https://onnx.ai
Apache License 2.0
1k stars 181 forks source link

ValueError: #393

Open poolplayer32285 opened 4 years ago

poolplayer32285 commented 4 years ago

I'm getting this error. Any help would be appreciated

1 import onnxmltools import coremltools coreml_model = coremltools.utils.load_spec('My212BlackoutMesh.mlmodel') onnx_model = onnxmltools.convert_coreml(coreml_model, 'Example Model Test') Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/onnxmltools/convert/main.py", line 17, in convert_coreml return convert(model, name, initial_types, doc_string, target_opset, targeted_onnx, File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/onnxmltools/convert/coreml/convert.py", line 60, in convert topology = parse_coreml(spec, initial_types, target_opset, custom_conversion_functions, custom_shape_calculators) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/onnxmltools/convert/coreml/_parse.py", line 467, in parse_coreml topology.compile() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/onnxconverter_common/topology.py", line 639, in compile self._infer_all_types() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/onnxconverter_common/topology.py", line 515, in _infer_all_types operator.infer_types() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/onnxconverter_common/topology.py", line 117, in infer_types registration.get_shape_calculator(self.type)(self) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/onnxconverter_common/registration.py", line 68, in get_shape_calculator raise ValueError('Unsupported shape calculation for operator %s' % operator_name) ValueError: Unsupported shape calculation for operator visionFeaturePrint

jiafatom commented 4 years ago

Do you have this visionFeaturePrint in your model? The converter may not support that yet.

xadupre commented 4 years ago

No change was made on converters for coremltools. This means the model includes an operator which cannot be converted by onnxmltools.