2

I covert onnxmodel to pb, and get this problem:

Traceback (most recent call last):
  File "/home/fffan/fffan_files/Experiment/Example/onnx2pb/onnx2pb.py", line 45, in <module>
    onnx2pb_2(onnx_input_path)
  File "/home/fffan/fffan_files/Experiment/Example/onnx2pb/onnx2pb.py", line 14, in onnx2pb_2
    tf_rep = prepare(model,strict=False)
  File "/home/fffan/下载/onnx-tensorflow-tf-1.x/onnx_tf/backend.py", line 65, in prepare
    return cls.onnx_model_to_tensorflow_rep(model, strict)
  File "/home/fffan/下载/onnx-tensorflow-tf-1.x/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 "/home/fffan/下载/onnx-tensorflow-tf-1.x/onnx_tf/backend.py", line 146, in _onnx_graph_to_tensorflow_rep
    strict=strict)
  File "/home/fffan/下载/onnx-tensorflow-tf-1.x/onnx_tf/backend.py", line 241, in _onnx_node_to_tensorflow_op
    return handler.handle(node, tensor_dict=tensor_dict, strict=strict)
  File "/home/fffan/下载/onnx-tensorflow-tf-1.x/onnx_tf/handlers/handler.py", line 60, in handle
    cls.args_check(node, **kwargs)
  File "/home/fffan/下载/onnx-tensorflow-tf-1.x/onnx_tf/handlers/backend/resize.py", line 89, in args_check
    "Tensorflow")
  File "/home/fffan/下载/onnx-tensorflow-tf-1.x/onnx_tf/common/exception.py", line 50, in __call__
    raise self._func(self.get_message(op, framework))
RuntimeError: Resize coordinate_transformation_mode=pytorch_half_pixel is not supported in Tensorflow.

The code is :

import onnx
from onnx_tf.backend import prepare
import numpy as np
model = onnx.load(onnx_input_path)
tf_rep = prepare(model,strict=False)

How can I solve this problem?

ps: The algorithm model I covert is PSEnet.

Frank.Fan
  • 929
  • 3
  • 14
  • 23
  • Found a similar issue that would help you resolve your issue https://stackoverflow.com/questions/59209061/ –  Oct 22 '20 at 17:36

0 Answers0