- 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安裝
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.