美文网首页
caffe model 转 caffe2 model

caffe model 转 caffe2 model

作者: uriah | 来源:发表于2017-06-12 19:42 被阅读0次

    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/

    相关文章

      网友评论

          本文标题:caffe model 转 caffe2 model

          本文链接:https://www.haomeiwen.com/subject/lptrqxtx.html