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
My environment is:
My final goal: ONNX model convert to tflite.
Question: My ONNX model input name is [input], output name is [output1, output2]
[input]
[output1, output2]
ONNX convert to Tensorflow is use SavedModel format in Tensorflow 2.x.
SavedModel
import onnx from onnx_tf.backend import prepare onnx_model = onnx.load(onnx_model_path) onnx_tf_exporter = prepare(onnx_model) onnx_tf_exporter.export_graph(tensorflow_model_output_path)
I display output model (saved_model.pb) in Netron, input name is not equal to ONNX.
Then I convert the SavedModel to tflie.
import tensorflow as tf converter = tf.lite.TFLiteConverter.from_saved_model(tensorflow_model_path) converter.optimizations = [tf.lite.Optimize.DEFAULT] tflite_model = converter.convert() with open(tensorflow_lite_model_output_path, 'wb') as f: f.write(tflite_model)
Tflie model input name is equal to SavedModel [serving_default_input:0], output name is [StatefulPartitionedCall:1, StatefulPartitionedCall:1]
[serving_default_input:0]
[StatefulPartitionedCall:1, StatefulPartitionedCall:1]
Please how can I make tflite input name and output name equal to ONNX?
The text was updated successfully, but these errors were encountered:
duplicate #984
Sorry, something went wrong.
No branches or pull requests
My environment is:
My final goal:
ONNX model convert to tflite.
Question:
My ONNX model input name is
[input]
, output name is[output1, output2]
ONNX convert to Tensorflow is use
SavedModel
format in Tensorflow 2.x.I display output model (saved_model.pb) in Netron, input name is not equal to ONNX.
Then I convert the SavedModel to tflie.
Tflie model input name is equal to SavedModel
[serving_default_input:0]
, output name is[StatefulPartitionedCall:1, StatefulPartitionedCall:1]
Please how can I make tflite input name and output name equal to ONNX?
The text was updated successfully, but these errors were encountered: