caffe model 转 caffe2 model

2017-06-12  本文已影响0人  uriah

ubuntu 安装caffe2后,发现
python -m caffe2.python.caffe_translator deploy.prototxt pretrained.caffemodel

Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python2.7/dist-packages/caffe2/python/caffe_translator.py", line 11, in <module>
from caffe.proto import caffe_pb2
ImportError: No module named caffe.proto

解决办法, caffe2/build是存放编译文件的目录,把./build/caffe 拷贝到python的库路径就可以了。比如 cp -r ./caffe /usr/lib/python2.7/dist-packages/

上一篇下一篇

猜你喜欢

热点阅读