- curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
- git clone https://github.com/torch/distro.git ~/torch - -recursive
- cd ~/torch
- ./install.sh # and enter “yes” at the end to modify your bashrc
- source ~/.bashrc
- luarocks install nngraph
- luarocks install optim
- luarocks install nn
- git clone https://github.com/karpathy/char-rnn
- 测试:th train.lua -gpuid -1
- 参考:https://github.com/karpathy/char-rnn
- luarocks install nn
- luarocks install dpnn
- luarocks install torchx
- luarocks install rnn
- iTorch安装:参考facebook/iTorch
- sudo apt-get install libzmq3-dev libssl-dev python-zmq
- git clone https://github.com/facebook/iTorch.git
- cd ~/iTorch
- luarocks make
- 如果之前没安装jupyter,要安装一下sudo pip install jupyter
- 运行:itorch notebook
Debug工具
- 参考 zbs-torch
- 参考ZeroBrane Studio
- luarocks install mobdebug
- git clone https://github.com/soumith/zbs-torch.git
- cd zbs-torch
- Start zbs from the zbs-torch directory with the command : ./zbstudio.sh
- Start the debugger server from “Project->Start Debugger Server”
- Change the interpreter to Torch-7 “Project->Lua Interpreter->Torch-7”
Add the following line to the top of the file you are debugging
require('mobdebug').start()
光标指到第一行,按绿色箭头,里面还有step over可单步执行,在watch中可添加变量观察
- 命令行参数在”Project–Command Line Parameters” 里输入
- 图形化:sudo apt-get install graphviz -y
Torch安装
最新推荐文章于 2024-03-18 12:08:24 发布