tensorflow-onnx icon indicating copy to clipboard operation
tensorflow-onnx copied to clipboard

Inconsistent results of tf model and exported ONNX for 1 signature_def, while same for another

Open wxinbo opened this issue 2 years ago • 1 comments

Describe the bug

I have 2 signature to export to ONNX from same model. After conversion, 1 of them is fine, same results of TF and ONNX. But another signature has different prediction results of TF and ONNX.

Since 1 signature works well, I suppose the tf, tf2onnx version is fine.

The wrong signature has tf.one_hot processing, might be caused by this? Or any suggestions on debugging this issue?

Urgency

System information

  • OS Platform and Distribution : windows11
  • TensorFlow Version: tf.2.4.0
  • Python version: 3.7.16
  • ONNX version (if applicable, e.g. 1.11*): 1.14.0
  • ONNXRuntime version (if applicable, e.g. 1.11*): 1.14.1

To Reproduce

Screenshots

Additional context

wxinbo avatar Jun 30 '23 13:06 wxinbo

What do you mean by 2 signatures?

Do you mind taking a look at tests relative to one_hot to see if any thing could be adjusted?

fatcat-z avatar Jul 26 '23 10:07 fatcat-z