Convert ONNX model file to Caffe2 model file(pb)

Convert ONNX model file to Caffe2 model file(pb)

onnx-caffe2 has bundled a shell command convert-onnx-to-caffe2 for converting ONNX model file to Caffe2 model file.

$ convert-onnx-to-caffe2 assets/squeezenet.onnx --output predict_net.pb --init-net-output init_net.pb
Note in ONNX model file, parameters and network structure are all stored in one model file, while in Caffe2, they are normally stored in separated init_net.pb (parameters) and predict_net.pb (network structure) files.

ref:

https://github.com/onnx/tutorials/blob/master/tutorials/OnnxCaffe2Import.ipynb

TensorFlow 保存模型为 PB 文件 & 加载PB文件代码

TensorFlow 保存模型为 PB 文件 & 加载PB文件代码

从Tensorflow模型文件中解析并显示网络结构图(pb模型篇)

https://www.jianshu.com/p/b547c163e202
https://github.com/huachao1001/CNNGraph

猜你喜欢

转载自blog.csdn.net/weixin_41521681/article/details/113361351