zoukankan      html  css  js  c++  java
  • caffe matlab接口编译遇到的问题记录

    今天编译的过程中遇到的问题以及查阅到的资料,记录在这里,希望可以帮到其他人。

    BVLC的caffe源码,如果要编译matlab的接口时,首先需要将makefile.config文件中的matlab的安装路径给到:

    然后再

    make all

    在这里make的过程中,如果采用-j8多和编译的时候,可能会出现protobuf没有的错误,但是单核编译就没有问题,也是醉了。

    make matcaffe

    这时候有可能会遇到系统的gcc版本与matlab支持的gcc版本不一致的问题,参照这篇博客先对gcc进行了降级操作:

    sudo apt-get install -y gcc-4.7

    sudo apt-get install -y g++-4.7

    cd /usr/bin/

    sudo rm gcc

    sudo ln -s gcc-4.7 gcc

    sudo rm g++

    sudo ln -s g++-4.7 g++

    gcc -v

    然后再次

    make clean 

    make all

    make matcaffe

    此时又会遇到这样的问题(error: no matching function for call to ‘remove_if(std::vector<boost::shared_ptr<caffe::Solver<float> > >::iterator, std::vector<boost::shared_ptr<caffe::Solver<float> > >::iterator, delete_solver(int, mxArray**, int, const mxArray**)::<lambda(const boost::shared_ptr<caffe::Solver<float> >&)>)’)按照这里的方法编译通过;

    然后在使用caffe的matlab接口的时候还会遇到libprotobuf.so.10:cannot open shared object file:ne such file or directory的问题,只有与matlab所使用的libprotobuf与Anaconda使用的不一样,类似于这里的操作,将matlab本身的删掉,然后再将Anaconda里面的对应的文件建立软链接到matlab对应的位置即可。

    如果遇到没有cv2模块的错误,用如下的命令进行安装:

    conda install opencv

  • 相关阅读:
    第6章4节《MonkeyRunner源代码剖析》Monkey原理分析-事件源-事件源概览-翻译命令字串
    Android RecyclerView And CardView
    openstack配置增加
    Failed to allocate the network(s), not rescheduling
    openstack 网络
    python
    云安全
    Python
    ERROR (ClientException): Unexpected API Error
    cocos2d-x 场景切换
  • 原文地址:https://www.cnblogs.com/rainsoul/p/6594993.html
Copyright © 2011-2022 走看看