Answers.Body: <p>It is a labor-intensive process, but that does sound excessive. If you have a g2.8xlarge, make sure you are using the using the GPU flags for neural-style, which will cut your render time by an order of magnitude. </p>
  
  <p>That having been said, it is building a rather large network (depending on your parameters), and a 1024x768 image is a lot of input to work with. It will take time, but shouldn't take more than a couple hours with the GPU flag enabled correctly. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-23T15:55:43.000Z
Answers.LastActivityDate: 2018-04-15T04:16:38.293Z
Answers.LastEditDate: 2018-04-15T04:16:38.293Z
Answers.UserDisplayName: Tyler Heldreth
Answers.Body: <p>Real time style transfer and neural doodle is very much possible and is an active topic I see users working on to improve upon. The basic idea is to do only feed forward propagation at test time and train with appropriate loss functions at train time.</p>
  
  <p><a href="http://arxiv.org/pdf/1603.08155v1.pdf" rel="nofollow">Perceptual Losses for Real-Time Style Transfer
  and Super-Resolution</a> is a good starting point to understand a methodology for this purpose.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-23T17:32:53.517Z
Answers.LastActivityDate: 2016-08-23T17:32:53.517Z
Answers.UserDisplayName: shekkizh
Body: <p>Consider these neural style algorithms which produce some art work:</p>
  
  <ul>
  <li><a href="https://github.com/alexjc/neural-doodle">Neural Doodle</a></li>
  <li><a href="https://github.com/jcjohnson/neural-style">neural-style</a></li>
  </ul>
  
  <p>Why is generating such images so slow and why does it take huge amounts of memory? Isn't there any method of optimizing the algorithm?</p>
  
  <p>What is the mechanism or technical limitation behind this? Why we can't have a realtime processing?</p>
  
  <p>Here are few user comments (<a href="https://www.reddit.com/r/deepdream/comments/3jwl76/how_anyone_can_create_deep_style_images/">How ANYONE can create Deep Style images</a>):</p>
  
  <ul>
  <li><blockquote>
    <p>Anything above 640x480 and we're talking days of heavy crunching and an insane amount of ram.</p>
  </blockquote></li>
  <li><blockquote>
    <p>I tried doing a 1024pixel image and it still crashed with 14gigs memory, and 26gigs swap. So most of the VM space is just the swapfile. Plus it takes several hours potentially days cpu rendering this.</p>
  </blockquote></li>
  <li><blockquote>
    <p>I tried 1024x768 and with 16gig ram and 20+ gig swap it was still dying from lack of memory.</p>
  </blockquote></li>
  <li><blockquote>
    <p>Having a memory issue, though. I'm using the "g2.8xlarge" instance type.</p>
  </blockquote></li>
  </ul>
  
Tags: <performance><neural-doodle><deepdreaming>
Title: Why is the generation of deep style images so slow and resource-hungry?
UserDisplayName: kenorb
ThreadText: # Why is the generation of deep style images so slow and resource-hungry?
  
  (Asked by: username_0 on 2016-08-02)
  
  Consider these neural style algorithms which produce some art work:
  
  * [Neural Doodle](https://github.com/alexjc/neural-doodle)
  * [neural-style](https://github.com/jcjohnson/neural-style)
  
  Why is generating such images so slow and why does it take huge amounts of memory? Isn't there any method of optimizing the algorithm?
  
  What is the mechanism or technical limitation behind this? Why we can't have a realtime processing?
  
  Here are few user comments ([How ANYONE can create Deep Style images](https://www.reddit.com/r/deepdream/comments/3jwl76/how_anyone_can_create_deep_style_images/)):
  
  * > Anything above 640x480 and we're talking days of heavy crunching and an insane amount of ram.
  * > I tried doing a 1024pixel image and it still crashed with 14gigs memory, and 26gigs swap. So most of the VM space is just the swapfile. Plus it takes several hours potentially days cpu rendering this.
  * > I tried 1024x768 and with 16gig ram and 20+ gig swap it was still dying from lack of memory.
  * > Having a memory issue, though. I'm using the "g2.8xlarge" instance type.
  
  **Tags:** performance, neural-doodle, deepdreaming
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-08-23. Score: 3 | Accepted answer
  
  Real time style transfer and neural doodle is very much possible and is an active topic I see users working on to improve upon. The basic idea is to do only feed forward propagation at test time and train with appropriate loss functions at train time.
  
  [Perceptual Losses for Real-Time Style Transfer
  and Super-Resolution](http://arxiv.org/pdf/1603.08155v1.pdf) is a good starting point to understand a methodology for this purpose.
  
  
  ---
  
  ### Answer by username_1 on 2016-08-23. Score: 2
  
  It is a labor-intensive process, but that does sound excessive. If you have a g2.8xlarge, make sure you are using the using the GPU flags for neural-style, which will cut your render time by an order of magnitude.
  
  That having been said, it is building a rather large network (depending on your parameters), and a 1024x768 image is a lot of input to work with. It will take time, but shouldn't take more than a couple hours with the GPU flag enabled correctly.
  
  
  ---
  
  