运行错误" python draw_net.py"

时间:2017-09-08 04:04:14

标签: python caffe pycaffe

    ezio@FM-NW-02:~/object_detection_5cls/caffe/python$ python draw_net.py ../examples/mnist/lenet_train_test.prototxt  lenet.png
Traceback (most recent call last):
  File "draw_net.py", line 8, in <module>
    import caffe
  File "/home/ezio/object_detection_5cls/caffe/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "/home/ezio/object_detection_5cls/caffe/python/caffe/pycaffe.py", line 13, in <module>
    from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: /home/ezio/object_detection_5cls/caffe/python/caffe/../../build/lib/libcaffe.so.1.0.0-rc3: undefined symbol: _ZNK7leveldb6Status8ToStringB5cxx11Ev

我已经运行make pycaffe; make all; make test; make runtest,这些都已通过。 MNIST和CIFAR10演示也如期待。 但是当我尝试绘制网时,发生了如上所述的错误。 我按libleveldb安装了sudo apt-get install libleveldb-dev 任何人都可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

好吧,我修复了这个错误。

只需运行if 'r' in r: ....

但其他错误:sudo python draw_net.pyno module named google-protobuf

然后我使用no module named skimage.iosudo apt-get install python-protobuf来安装这些软件包

返回sudo apt-get install python-skimage。将在caffe_root / python文件夹

中创建一个图像文件