onnx / onnx-tensorflow

Tensorflow Backend for ONNX
Other
1.28k stars 296 forks source link

iterating over `tf.Tensor` is not allowed: AutoGraph did convert this function. This might indicate you are trying to use an unsupported feature. #888

Open Adhithya-tech opened 3 years ago

Adhithya-tech commented 3 years ago

Describe the bug iterating over tf.Tensor is not allowed: AutoGraph did convert this function. This might indicate you are trying to use an unsupported feature. A clear and concise description of what the bug is.

To Reproduce import onnx from onnx_tf.backend import prepare

onnx_model = onnx.load("FasterRCNN.onnx") # load onnx model tf_rep = prepare(onnx_model) tf_rep.export_graph("frcnn_resnet.pb") Please give us instructions to reproduce your problem.

A self-contained piece of code that can demonstrate the problem is required.

Please do not expect us to have PyTorch, Caffe2 installed.

If a model exported from PyTorch and Caffe2 is having trouble in ONNX-TF, use the next section to attach the model.

ONNX model file

If applicable, attach the onnx model file in question using Gist, DropBox or Google Drive.

Python, ONNX, ONNX-TF, Tensorflow version

This section can be obtained by running get_version.py from util folder.

Additional context

Add any other context about the problem here.

chinhuang007 commented 3 years ago

Please share FasterRCNN.onnx file for debugging.

Adhithya-tech commented 3 years ago

I used the pre-trained onnx model from the model zoo to convert it to tensorflow

lucy3589 commented 2 years ago

you can upgrade tensorflow version, and upgrade onnx_tf, onnx, tensorflow-probability