torch運行synthesis的代碼可能會遇到的問題及解決方案

如果想用cuda,一定要先裝!!!!



1. 安裝 cuda 和 cudnn

http://blog.csdn.net/sun7_she/article/details/68946966

http://blog.csdn.net/iotlpf/article/details/54175064


想要運行代碼,可能會遇到的問問題及解決方法:

2:安裝 loadcaffe 會出現以下問題:

CMake Error at /opt/packman/cmake/3.2.1/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find Armadillo (missing: ARMADILLO_LIBRARY ARMADILLO_INCLUDE_DIR)
Call Stack (most recent call first):
  /opt/packman/cmake/3.2.1/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
  /opt/packman/cmake/3.2.1/share/cmake-3.2/Modules/FindArmadillo.cmake:107 (find_package_handle_standard_args)
  external/geomtk/CMakeLists.txt:46 (find_package)
解決方法:

https://segmentfault.com/a/1190000002689335

2. 然後出現缺少protobuf的命令,解決方法如下:

安裝protobuf

簡單版(第二次配置又遇到了這個問題,用以下語句解決,在這之前還運行了複雜版的前4句,然後走不通才換用這句,不知道有沒有影響):

sudo apt-get install libprotobuf-dev protobuf-compiler

複雜版(第一次解決問題是用的以下語句):

http://www.th7.cn/system/lin/201602/153793.shtml

實際使用的語句爲:

sudo apt-get install m4
sudo apt-get install autoconf
sudo apt-get install automake
sudo apt-get install libtool

wget  https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
tar -zxvf  protobuf-2.6.1.tar.gz
cd protobuf-2.6.1
./configure
make
make check
sudo make install

安裝完檢查版本號:protoc --version

會報錯:

protoc: error while loading shared libraries: libprotocbuf.so.9: cannot open shared
解決辦法:在 /etc/ld.so.conf.d/目錄下創建文件 bprotobuf.conf文件

sudo vim /etc/ld.so.conf.d
文件內容如下:

/usr/local/lib
輸入命令:

sudo ldconfig

這時,再輸入protoc --version就可以正常看到版本號了


2. 安裝 cuda 和 cudnn

http://blog.csdn.net/iotlpf/article/details/54175064

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章