torch for mac 与 torch for linux

来源:互联网 发布:qq表情软件 编辑:程序博客网 时间:2024/06/05 17:23

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

就酱~


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

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

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

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

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 bashsource ~/.bashrc

# On Linux with zshsource ~/.zshrc


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


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

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

luarocks install itorch

sudo apt-get install ipython-notebook

使用:itorch notebook


完美~


0 0