Torch安裝

  1. curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
  2. git clone https://github.com/torch/distro.git ~/torch - -recursive
  3. cd ~/torch
  4. ./install.sh # and enter “yes” at the end to modify your bashrc
  5. source ~/.bashrc
  6. luarocks install nngraph
  7. luarocks install optim
  8. luarocks install nn
  9. git clone https://github.com/karpathy/char-rnn
  10. 測試:th train.lua -gpuid -1
  11. 參考:https://github.com/karpathy/char-rnn
  12. luarocks install nn
  13. luarocks install dpnn
  14. luarocks install torchx
  15. luarocks install rnn
  16. 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
  17. 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” 裏輸入
  18. 圖形化:sudo apt-get install graphviz -y
發佈了104 篇原創文章 · 獲贊 14 · 訪問量 10萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章