You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I trained classification model based on Deverta architecture using transformers package.
And I converted onnx file with my model.
It was successful.
By the way, Error was occured When I save to tensorflow file using onnx file.
How can I convert to tf file using onnx file ?
File "/home/jovyan/Segmentation/onnx-tensorflow/onnx_tf/backend_tf_module.py", line 99, in __call__ *
output_ops = self.backend._onnx_node_to_tensorflow_op(onnx_node,
File "/home/jovyan/Segmentation/onnx-tensorflow/onnx_tf/backend.py", line 347, in _onnx_node_to_tensorflow_op *return handler.handle(node, tensor_dict=tensor_dict, strict=strict)
File "/home/jovyan/Segmentation/onnx-tensorflow/onnx_tf/handlers/handler.py", line 59, in handle *return ver_handle(node, **kwargs)
File "/home/jovyan/Segmentation/onnx-tensorflow/onnx_tf/handlers/backend/gather_elements.py", line 71, in version_13 *return cls._common(node, **kwargs)
File "/home/jovyan/Segmentation/onnx-tensorflow/onnx_tf/handlers/backend/gather_elements.py", line 41, in _common *
axis_perm = tf.tensor_scatter_nd_update(tf.range(tf.rank(data)),
TypeError: Expected any non-tensor type, but got a tensor instead.
And I analized "gather_elements.py" file.
"tf.constant([axis, 0])" is the problem.
axis variable is "Tensor("Add_18:0", shape=(), dtype=int32)"
So, It was not complete convert to constant.
Let me know How can I this problem?...!
Python, ONNX, ONNX-TF, Tensorflow version
This section can be obtained by running get_version.py from util folder.
Python version: 3.8.12
ONNX version: 1.11.0
ONNX-TF version: 1.10.0
Tensorflow version: 2.13.0
Additional context
I added this PR When I install onnx-tf package.
Because "Squeeze" and "Unsqueeze" is not supported 13 version in the latest version.
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Hi, I'm having the same trouble as you during the conversion from ONNX model to Tensorflow model. Can I know whether you have already solved this issue? Thanks in advance!
I trained classification model based on Deverta architecture using transformers package.
And I converted onnx file with my model.
It was successful.
By the way, Error was occured When I save to tensorflow file using onnx file.
How can I convert to tf file using onnx file ?
My code is simple :
Error is here
And I analized "gather_elements.py" file.
So, It was not complete convert to constant.
Let me know How can I this problem?...!
Python, ONNX, ONNX-TF, Tensorflow version
This section can be obtained by running
get_version.py
from util folder.Additional context
I added this PR When I install onnx-tf package.
Because "Squeeze" and "Unsqueeze" is not supported 13 version in the latest version.
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: