Home > database >  How could I convert Tensorflow version 1 to onnx model?
How could I convert Tensorflow version 1 to onnx model?

Time:01-24

I tried python -m tf2onnx.convert --saved-model [file_name] --output [onnx_file_name]. but It is run by tensorflow = 2.4.4 automatically. I want to run tensorflow version 1 code. Is this code have a option of it?

CodePudding user response:

You can install TensorFlow version 1, I also trying to use tf.compat.v1.layers that also work with the result . You may need to use model.save to have .pb format and convert by the program.

Saved and complies Executes Sample Project

CodePudding user response:

I used python -m tf2onnx.convert --saved-model [model file] --output [onnx file name].onnx --opset 13 and I solved it.

  •  Tags:  
  • Related