Install Torch Dependencies
curl -sk https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
Install Torch in a local folder
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; ./install.sh
if you come across error: readline/readline.h: No such file or directory . click
readline/readline.h: No such file or directory-ai616818-ChinaUnix博客
If you want to uninstall torch, you can use the command:rm -rf ~/torch
Install Folly, fbthrift, thpp and fblualib
curl -sk https://raw.githubusercontent.com/soumith/fblualib/master/install_all.sh | bash
Install fbcunn
git clone https://github.com/torch/nn && cd nn && git checkout getParamsByDevice && luarocks make rocks/nn-scm-1.rockspec
git clone https://github.com/facebook/fbcunn.git
cd fbcunn && luarocks make rocks/fbcunn-scm-1.rockspec # go get a coffee
If you want to run the imagenet example, you need fbnn
git clone https://github.com/facebook/fbnn.git && cd fbnn
luarocks make rocks/fbnn-scm-1.rockspec