1.安装luarocks
|
1 |
$ sudo apt-get install luarocks |
2.安装torch
|
1 2 3 |
$ git clone https://github.com/torch/distro.git ~/torch --recursive $ cd ~/torch; bash install-deps; $ ./install.sh |
如果要使用NVIDIA CUDA加速版本的Torch7则使用如下方法
1.安装luarocks
|
1 |
$ sudo apt-get install luarocks |
2.下载NVIDIA CUDA适配的代码
|
1 |
$ git clone https://github.com/torch/cutorch.git |
3.安装编译依赖的库
|
1 |
$ sudo apt install nvidia-cuda-toolkit |
4.编译代码
|
1 2 3 4 5 |
$ cd cutorch $ mkdir build $ cd build $ cmake .. $ make |