onnx / tensorflow-onnx

Convert TensorFlow, Keras, Tensorflow.js and Tflite models to ONNX
Apache License 2.0
2.29k stars 432 forks source link

how change .tflite model to onnx and nwhc to nchw? #2138

Open sdZ1123 opened 1 year ago

sdZ1123 commented 1 year ago

Ask a Question

Question

Further information

Model opset:

Notes

fatcat-z commented 1 year ago

You convert tflite models via command line, for example:

python -m tf2onnx.convert --opset 16 --tflite tflite--file --output model.onnx

sdZ1123 commented 1 year ago

You convert tflite models via command line, for example:

python -m tf2onnx.convert --opset 16 --tflite tflite--file --output model.onnx Thank you very much for your answer. But, I want to output the onnx model in nchw format,I input: python -m tf2onnx.convert --opset 16 --tflite tflite--file --output model.onnx --input_as_nchw It is still nhwc tflite file is mediapipe‘s pose_landmark_full.tflite.

fatcat-z commented 1 year ago

Please refer to here for a try.