简体   繁体   中英

How could I convert Tensorflow version 1 to onnx model?

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?

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.

保存并遵守 执行 示例项目

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM