<p>I think <a href="https://github.com/artvandelay/Deep_Inside_Convolutional_Networks/blob/master/visualize.py" rel="nofollow">this code</a> is a good starting point to reproduce the images Google team published. The procedure looks clear:</p>

<ol>
<li>Start with a pure noise image and a class (say "cat")</li>
<li>Perform a forward pass and backpropagate the error wrt the imposed class label</li>
<li>Update the initial image with the gradient computed at the data layer</li>
</ol>

<p>There are some tricks involved, that can be found in the <a href="http://arxiv.org/abs/1312.6034" rel="nofollow">original paper</a>.</p>

<p>It seems that the main difference is that Google folks tried to get a more "realistic" image:</p>

<blockquote>
  <p>By itself, that doesn’t work very well, but it does if we impose a prior constraint that the image should have similar statistics to natural images, such as neighboring pixels needing to be correlated. </p>
</blockquote>
Google Inceptionism: obtain images by class
<p>In the famous Google Inceptionism article,
<a href="http://googleresearch.blogspot.jp/2015/06/inceptionism-going-deeper-into-neural.html" rel="noreferrer">http://googleresearch.blogspot.jp/2015/06/inceptionism-going-deeper-into-neural.html</a>
they show images obtained for each class, such as banana or ant. I want to do the same for other datasets.</p>

<p>The article does describe how it was obtained, but I feel that the explanation is insufficient.</p>

<p>There's a related code
<a href="https://github.com/google/deepdream/blob/master/dream.ipynb" rel="noreferrer">https://github.com/google/deepdream/blob/master/dream.ipynb</a></p>

<p>but what it does is to produce a random dreamy image, rather than specifying a class and learn what it looks like in the network, as shown in the article above.</p>

<p>Could anyone give a more concrete overview, or code/tutorial on how to generate images for specific class? (preferably assuming caffe framework)</p>