Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install Neural Style Transfer
# Ubuntu:14.04 - 64 bits
curl -sk | bash
git clone ~/torch --recursive
cd ~/torch; ./
. ~/.bashrc # or: . ~/.zshrc
luarocks install nn
luarocks install nngraph
luarocks install image
sudo apt-get -y install libprotobuf-dev protobuf-compiler
luarocks install loadcaffe
sudo apt-get -y install libhdf5-dev hdf5-tools python-dev python-pip
pip install cython numpy h5py
luarocks install hdf5
cd /home
git clone
cd neural-style
luarocks install FindCUDA
luarocks install cunn
luarocks install cutorch
sh models/
# gpu 0 or 1
th neural_style.lua -style_image examples/inputs/picasso_selfport1907.jpg -content_image examples/inputs/brad_pitt.jpg -output_image profile.png -model_file models/VGG_ILSVRC_19_layers.caffemodel -proto_file models/VGG_ILSVRC_19_layers_deploy.prototxt -gpu -1 -num_iterations 1000 -seed 123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.