torch入门笔记1:torch的使用

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

  • Mac OS X or Linux (tested in Ubuntu 14.04 and Arch Linux)
  • Torch-7
  • IPython version 2.2 or above (you can check your version of ipython using ipython --version)
  • ZeroMQ

# 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

Installing iTorch

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




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值