TypeError: Failed to convert elements of [None] to Tensor. Consider casting elements to a supported type.
surajpandey353 opened this issue · 0 comments
surajpandey353 commented
Hi,
I am trying to export a torch QAT model (ONNX -> tf ->TFLite). I have the ONNX model and 12 tf_rep = prepare(onnx_model, strict = False) ---> 13 tf_rep.export_graph(tf_model_path)
seems to be creating the issue. Although similar issue with the <class.List> was mentioned before #889, there is similar issue which is arising at QLinearConv . This issue persists.
Error:
'''
TypeError: in user code:
File "/home/pandey/anaconda3/envs/e2enc/lib/python3.9/site-packages/onnx_tf/backend_tf_module.py", line 99, in __call__ *
output_ops = self.backend._onnx_node_to_tensorflow_op(onnx_node,
File "/home/pandey/anaconda3/envs/e2enc/lib/python3.9/site-packages/onnx_tf/backend.py", line 347, in _onnx_node_to_tensorflow_op *
return handler.handle(node, tensor_dict=tensor_dict, strict=strict)
File "/home/pandey/anaconda3/envs/e2enc/lib/python3.9/site-packages/onnx_tf/handlers/handler.py", line 59, in handle *
return ver_handle(node, **kwargs)
File "/home/pandey/anaconda3/envs/e2enc/lib/python3.9/site-packages/onnx_tf/handlers/backend/q_linear_conv.py", line 45, in version_10 *
w_zero_point = tf.fill([x.shape[1]], w_zero_point)
TypeError: Failed to convert elements of [None] to Tensor. Consider casting elements to a supported type. See https://www.tensorflow.org/api_docs/python/tf/dtypes for supported TF dtypes.
'''
Python, ONNX, ONNX-TF, Tensorflow version
Python version: 3.9.0
ONNX version: 1.14.0
ONNX-TF version: 1.10.0
Tensorflow version: 2.12.0
Could someone help me understand what is causing this issue?
Thanks!