We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
ZeroPadding2D + Conv2D with bias term cannot be exported as single Conv2D ONNX operator. It is exported as Conv2D + Add instead.
Urgency
We wish it could be fixed asap.
System information
To Reproduce
In NVIDIA TensorFlow-1 Docker Container:
docker run -it --rm --gpus all -v $(pwd):/mnt nvcr.io/nvidia/tensorflow:21.08-tf1-py3
Install TF2ONNX (tried both the master branch and the latest release 1.9.2)
pip install git+https://github.com/onnx/tensorflow-onnx
Run the following script to generate ONNX file for Conv2DTranspose.
import onnx import tf2onnx import tensorflow as tf inputs = tf.keras.Input(shape=(64, 256, 256)) middles = tf.keras.layers.ZeroPadding2D( padding=(0, 4), data_format="channels_first", name="padding")(inputs) outputs = tf.keras.layers.Conv2D( filters=1, kernel_size=(9, 9), strides=(1, 1), use_bias=True, data_format="channels_first", name="conv2d", )(middles) model = tf.keras.Model(inputs=inputs, outputs=outputs) onnx_model, _ = tf2onnx.convert.from_keras( model=model, opset=13, large_model=False, ) onnx.save_model(onnx_model, "conv2d.onnx")
Screenshots
Additional context
N/A
The text was updated successfully, but these errors were encountered:
As before, hopefully someone else will be able to look at this soon, but feel free to do a PR if you want to.
Sorry, something went wrong.
hwangdeyu
Successfully merging a pull request may close this issue.
Describe the bug
ZeroPadding2D + Conv2D with bias term cannot be exported as single Conv2D ONNX operator. It is exported as Conv2D + Add instead.
Urgency
We wish it could be fixed asap.
System information
To Reproduce
In NVIDIA TensorFlow-1 Docker Container:
Install TF2ONNX (tried both the master branch and the latest release 1.9.2)
Run the following script to generate ONNX file for Conv2DTranspose.
Screenshots
Additional context
N/A
The text was updated successfully, but these errors were encountered: