1. 程式人生 > >caffe-鍵安裝及相關問題

caffe-鍵安裝及相關問題

  • caffe一鍵安裝
    新建指令碼:touch caffe_install.sh
    執行指令碼:sudo sh caffe_install.sh
CAFFE_ROOT=~/share/caffe
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get
install libatlas-base-dev sudo apt-get install libopenblas-dev sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev cd $CAFFE_ROOT/python sudo apt-get install python-pip python3-pip pip install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple pip pip3 install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple pip
for req in $(cat requirements.txt); do pip install -i https://pypi.tuna.tsinghua.edu.cn/simple $req; done for req in $(cat requirements.txt); do pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple $req; done sudo rm -rf $CAFFE_ROOT/build mkdir -p $CAFFE_ROOT/build cd $CAFFE_ROOT/build cmake .. make -j16
make pycaffe sudo make install
  • python3中import caffe :RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility問題

    原因:numpy版本不合適
    解決方法:
    sudo pip3 uninstall numpy
    sudo pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy==1.14.5