torch下的安装和使用:
1.torch7的github https://github.com/torch/torch7 下安装。
2.使用
luarocks install image 来安装package
已经安装的可以使用 luarock list 来查看
3.itorch的使用
https://github.com/facebook/iTorch
itorch是torch里面的一个包,它能很轻松地显示图片、视频和音频等等。
需要先安装ipython,然后你会发现还是无法用,比如th之后的命令行。
sudo apt-get install ipython-notebook
iTorch requires or works with
# OSX brew install zeromq brew install openssl luarocks install luacrypto OPENSSL_DIR=/usr/local/opt/openssl/ # Ubuntu sudo apt-get install libzmq3-dev libssl-dev python-zmq # Ubuntu 16 luarocks install lzmq
git clone https://github.com/facebook/iTorch.git
cd iTorch
luarocks make
If you have to use sudo for some reason (if you globally installed torch on Linux for example), use these commands:
sudo env "PATH=$PATH" luarocks make
sudo chown -R $USER $(dirname $(ipython locate profile))
itorch notebook # notebook mode OR itorch # console mode OR itorch qtconsole # Qt mode
跟ipython一样debug。
4.Torch reference link manuals and pages:
1) https://github.com/torch/tutorials
2) http://torch7.readthedocs.io/en/latest/index.html
2) https://github.com/soumith/cvpr2015/blob/master/Deep%20Learning%20with%20Torch.ipynb