onnx-tensorflow
onnx-tensorflow copied to clipboard
Converting ONNX dynamic input model to Tensorflow
Describe the bug
Cannot convert ONNX with dynamic input to Tensorflow
To Reproduce
- converting Pytorch model to ONNX model was used Resnext50_32x4d with dynamic batch size
dummy_input = torch.randn(1, 3, 224, 224)
dynamic_axes = {"input": {0: "batch"}, "output": {0: "batch"}}
torch.onnx.export(model,
dummy_input,
'dyanmic_model.onnx',
input_names=["input"], output_names=["output"],
verbose=True,
dynamic_axes=dynamic_axes
)
- converting ONNX to Tensorflow
onnx-tf convert -i dynamic_model.onnx -o tf_model
Python, ONNX, ONNX-TF, Tensorflow version
This section can be obtained by running get_version.py from util folder.
- Python version: 3.8.5
- ONNX version: 1.8.1
- ONNX-TF version: 1.7.0
- Tensorflow version: 2.4.1
Additional context WITHOUT dynamic input, I was able to convert with NO any errors.
Any update on this?