torch学习(一) torch for mac 与 torch for linux安装

如果让我做个比喻,那我想说,lua 就像 python, torch 就是 numpy。

就酱~

 

torch 官网: http://torch.ch/

安装指示页面: http://torch.ch/docs/getting-started.html#_

每个系统上都装了好几遍…才勉强成功了……

1、 按照官网的指示安装,第二个命令有可能下载失败,个人认为有些许被墙的原因。本人用手机开再开热点才下载成功,不知道是不是巧合…

解决ssh 语言包问题,在当前用户权限即可。

(ref:http://blog.chinaunix.net/uid-27570589-id-3691390.html)

git clone https://github.com/torch/distro.git ~/torch --recursive

cd ~/torch; bash install-deps;

./install.sh

 

2、linux 依然按照官网指示安装,mac 配置环境变量 echo "export PATH=xxxxxx:$PATH" >> ~/.bash_profile。

# On Linux with bash

source ~/.bashrc

# On Linux with zsh

source ~/.zshrc

完成后用在命令行输入th进行测试,若出现官网所示界面,则成功。

 

通常在图像处理的时候,还会需要itorch 和 ipython,可以在这个时候一起装了。

用刚才的命令下载的包进行下载。

luarocks install itorch

sudo apt-get install ipython-notebook

使用:itorch notebook

在我的电脑上用image.display不成功,需要退出在命令行输入qlua才可以,不知道为什么。

情况和这个类似。

https://github.com/torch/distro/issues/15

 

 

转载于:https://my.oschina.net/kathy00/blog/660082

你可能感兴趣的:(torch学习(一) torch for mac 与 torch for linux安装)