This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
Error while converting op of type: BatchNormalization. Error message: provided number axes -1 not supported #572
Labels
bug
Unexpected behaviour that should be corrected (type)
🐞Describe the bug
(1) I try to convert onnx model to mlmodel, but it's error:
Error while converting op of type: BatchNormalization. Error message: provided number axes -1 not supported
Trace
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1741, in
main()
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1735, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1135, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/Users/vipkid/PycharmProjects/ai/ai-teacher/apps/landmark_to_image/onnx_to_mlModel.py", line 27, in
minimum_ios_deployment_target='13')
File "/Users/vipkid/anaconda3/lib/python3.7/site-packages/onnx_coreml/converter.py", line 627, in convert
_convert_node_nd(builder, node, graph, err)
File "/Users/vipkid/anaconda3/lib/python3.7/site-packages/onnx_coreml/_operators_nd.py", line 2395, in _convert_node_nd
return converter_fn(builder, node, graph, err)
File "/Users/vipkid/anaconda3/lib/python3.7/site-packages/onnx_coreml/_operators_nd.py", line 349, in _convert_bn
err.unsupported_op_configuration(builder, node, graph, "provided number axes {} not supported".format(rank))
File "/Users/vipkid/anaconda3/lib/python3.7/site-packages/onnx_coreml/_error_utils.py", line 62, in unsupported_op_configuration
self.rerun_suggestion)
TypeError: Error while converting op of type: BatchNormalization. Error message: provided number axes -1 not supported
Please try converting with higher minimum_ios_deployment_target.
You can also provide custom function/layer to convert the model.
it may be a break at the name of BatchNormalization_31, the input[0] rank name is -1
To Reproduce
The text was updated successfully, but these errors were encountered: