参考:
将caffe.proto转成caffe_pb2.py:
protoc --python_out=. caffe.proto
二、准备转换工具
1、下载解压caffe:https://github.com/BVLC/caffe
2、下载解压caffe2:https://github.com/pytorch/pytorch/tree/master/caffe2
3、将生成的caffe_pb2.py拷贝到文件夹caffe2/python下
4、将caffe2/python/caffe_translator.py中
“from caffe.proto import caffe_pb2”
import caffe_pb2
三、模型转换:https://caffe2.ai/docs/caffe-migration.html
https://github.com/caffe2/tutorials/blob/master/Getting_Caffe1_Models_for_Translation.ipynb