Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

How to Install & Running "Neural Style (A Neural Algorithm of Artistic Style )" on your EC2 Instance

Links

EC2 GPU/CUDA INSTANCE (AMI:ami-ffba7b94)

g2.2xlarge or better

https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:ami=ami-ffba7b94

Login

ssh -i yourpemkey.pem ubuntu@ec2-public-dns-name

Update System Packages

sudo apt-get update
sudo apt-get upgrade

we must use CUDNN R2

cd cudnn-6.5-linux-x64-R2-rc1
sudo cp lib* /usr/local/cuda/lib64/
sudo cp cudnn.h /usr/local/cuda/include/

install Deep Learning modules

luarocks install image
luarocks install loadcaffe
luarocks install torch

neural-style

git clone https://github.com/jcjohnson/neural-style
cd neural-style
sh models/download_models.sh

create image

th neural_style.lua -num_iterations 2000 -style_image style.jpg -content_image image.jpg -image_size 400 -backend cudnn
@persac

This comment has been minimized.

Copy link

@persac persac commented Oct 22, 2017

The correct CUDNN directory seems to be
cd cudnn-6.5-linux-x64-v2-rc2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment