-
Notifications
You must be signed in to change notification settings - Fork 297
Description
Hi,
I am trying to convert a mlmodel to pb via onnx,
I've got an onnx model, When I was going to convert the onnx model to the tensorflow model, I got an error:NotImplementedError: Resize version 11 is not implemented.
the code is:
onnx_model = onnx.load('example.onnx') # load onnx model
tf_exp = prepare(onnx_model) # prepare tf representation
tf_exp.export_graph(pb_output_path) # export the model
the error is:
Traceback (most recent call last):
File "/Users/binwang/PycharmProjects/coreml2onnx2pb/venv/coreml2onnx2pb.py", line 22, in
coreml2onnx2pb(onnx_input_path, pb_output_path)
File "/Users/binwang/PycharmProjects/coreml2onnx2pb/venv/coreml2onnx2pb.py", line 15, in coreml2onnx2pb
tf_exp = prepare(onnx_model) # prepare tf representation
File "/Users/binwang/onnx-tensorflow/onnx_tf/backend.py", line 65, in prepare
return cls.onnx_model_to_tensorflow_rep(model, strict)
File "/Users/binwang/onnx-tensorflow/onnx_tf/backend.py", line 85, in onnx_model_to_tensorflow_rep
return cls._onnx_graph_to_tensorflow_rep(model.graph, opset_import, strict)
File "/Users/binwang/onnx-tensorflow/onnx_tf/backend.py", line 143, in _onnx_graph_to_tensorflow_rep
onnx_node, tensor_dict, handlers, opset=opset, strict=strict)
File "/Users/binwang/onnx-tensorflow/onnx_tf/backend.py", line 245, in _onnx_node_to_tensorflow_op
return handler.handle(node, tensor_dict=tensor_dict, strict=strict)
File "/Users/binwang/onnx-tensorflow/onnx_tf/handlers/handler.py", line 62, in handle
exception.OP_UNIMPLEMENTED_EXCEPT(node.op_type, cls.SINCE_VERSION)
File "/Users/binwang/onnx-tensorflow/onnx_tf/common/exception.py", line 31, in call
super(OpUnimplementedException, self).call(op, version, domain)
File "/Users/binwang/onnx-tensorflow/onnx_tf/common/exception.py", line 13, in call
raise self._func(self.get_message(*args, **kwargs))
NotImplementedError: Resize version 11 is not implemented.
Process finished with exit code 1
Versions Info:
python version: 3.7
tensorflow version:2.1.0
onnx version: 1.6.0
onnx-tf version: 1.6.0
How can I correctly convert onnx to tensorflow model?
Thank you!