Google Code Block

2016年12月1日

Environment Setup for Torch and fast-neural-style on Ubuntu

1. Install CUDA 8.0 and CUDNN 5.1

Please refer to Setup CUDA / CUDNN and Chainer for deep learning on Ubuntu 16.04


2. Install Torch from Torch#GetStarted

# in a terminal, run the commands WITHOUT sudo
git clone https://github.com/torch/distro.git ~/torch --recursive cd ~/torch; bash install-deps; ./install.sh # On Linux with bash
source ~/.bashrc

3. Install lua dependencies from torch/rocks on GitHub

git clone https://github.com/torch/rocks

luarocks install totem-0-0.rockspec  && 
luarocks install util-0-0.rockspec  && 
luarocks install fn-0-0.rockspec  && 
luarocks install pprint-0-0.rockspec  && 
luarocks install logroll-0-0.rockspec  && 
luarocks install hdf5-20-0.rockspec  &&

4. Run a Torch project : fast-neural-style

git clone https://github.com/jcjohnson/fast-neural-style

 - Generate a styled image
th fast_neural_style.lua -model models/eccv16/starry_night.t7 -input_image images/content/chicago.jpg -output_image out.png

沒有留言:

張貼留言