ubuntu 16.04 LTS上安装Torch7

1.安装luarocks

$ sudo apt-get install luarocks

2.安装torch

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

如果要使用NVIDIA CUDA加速版本的Torch7则使用如下方法

1.安装luarocks

$ sudo apt-get install luarocks

2.下载NVIDIA CUDA适配的代码

$ git clone https://github.com/torch/cutorch.git

3.安装编译依赖的库

$ sudo apt install nvidia-cuda-toolkit

4.编译代码

$ cd cutorch
$ mkdir build
$ cd build
$ cmake ..
$ make

参考链接


发布者

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注