yusuketomoto / chainer-fast-neuralstyle

Chainer implementation of "Perceptual Losses for Real-Time Style Transfer and Super-Resolution".
MIT License
803 stars 229 forks source link

Generating images takes 15 minutes #47

Closed vermapratyush closed 8 years ago

vermapratyush commented 8 years ago

On AWS machine (g2.2xlarge), I am trying to generate an image based on the model. The command I execute is:

Testing - Takes around 15 minutes
python generate.py sample_images/tubingen.jpg -m models/composition.model -o sample_images/output.jpg

I haven't used MS-COCO anywhere as I am using the existing model. From what I read in README, this should take ~1 second, however it takes 15 minutes.

Here are the steps that I followed (nothing new, just followed the readme):

  1. Git Clone
  2. Setup model "sh setup_model.sh"
  3. Generate image.
mxchinegod commented 8 years ago

On a Titan X it takes 1 second. This is a far superior card to what Amazon has available. Their cards are 2 generations old and have 1/3rd of the graphics memory. The GPU instances on AWS are their most limited, but I've been talking to them and they're working on it.

Not sure if you should be waiting 15 minutes but unfortunately if the code it working and it says CUDA is running, I don't know why that could be.

markzhong88 commented 8 years ago

try add -g 0?

vermapratyush commented 8 years ago

Adding -g to the generate.py worked. Thanks @markz-nyc However, it gave 'cudaErrorMemoryAllocation: out of memory'. With a smaller image it worked fine as mentioned in #3 When AWS upgrade their instances hopefully it will be much better.