ubuntu16.04安装torch

1-下载代码

git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch
bash install-deps
./install.sh

2-切换编译器

sudo unlink /usr/bin/gcc
sudo ln -s /usr/bin/gcc-4.9 /usr/bin/gcc

3-恢复编译器link

sudo unlink /usr/bin/gcc
sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc

4-安装依赖包
 

luarocks install luasocket
luarocks install loadcaffe


5-出现错误 pthread_create not found in ubuntu
解决方法 要安装protobuf
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler

6-安装图像显示模块

luarocks install image
luarocks install hdf5
luarocks install cutorch
luarocks install cunn

posted @ 2022-11-13 22:36  dlhl  阅读(164)  评论(0)    收藏  举报