Answers.Body: <p>Only the first convolutional layer, with filters that process the input [colour] channels directly, can be rendered <em>directly</em> as image patches in the same domain as the input. The left-most panel in your example looks like that.</p>
  <p>Further layers of the neural network cannot be rendered like this for two reasons:</p>
  <ul>
  <li><p>They have a number of input channels based on the previous layer's output, for example they may process 32 or 128 channels. There is no simple mapping of these channels to colours.</p>
  </li>
  <li><p>They respond to a wider range of input stimuli than any single image patch. If you tried to render out all inputs that they respond to then you would likely get an indistinct-looking grey blob, if anything at all. This is different to the first layer which does directly react pixel-by-pixel according to the weights.</p>
  </li>
  </ul>
  <p>What is typically done to render patches like the middle and right-most panels in your example, is to find sample patches that trigger a strong response from that filter. This search can be done using gradient <em>ascent</em> - start with noise, then take gradient steps in the direction of increasing the signal for that filter. This is also the basis of &quot;Deep Dream&quot; images, which instead of doing that for small patches, apply it to whole images, and many filters at once.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-15T19:20:43.673Z
Answers.LastActivityDate: 2021-06-16T19:02:06.420Z
Answers.LastEditDate: 2021-06-16T19:02:06.420Z
Answers.UserDisplayName: Neil Slater
Body: <p>There are several images related to convolutional networks on the Internet, an example of which I have given below
  <a href="https://i.sstatic.net/3QZkG.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3QZkG.png" alt="enter image description here" /></a></p>
  <p>My question is: are these images the weights/filters of the convolution layer (the weights that are learned in the learning process), or the convolved images of the previous layer's image with the filters of the current layer?</p>
  <p><strong>image source:</strong>
  <a href="https://stats.stackexchange.com/questions/362988/in-cnn-do-we-have-learn-kernel-values-at-every-convolution-layer">https://stats.stackexchange.com/questions/362988/in-cnn-do-we-have-learn-kernel-values-at-every-convolution-layer</a></p>
  
Tags: <neural-networks><convolutional-neural-networks><filters><explainable-ai><convolutional-layers>
Title: Are these visualisations the filters of the convolution layer or the convolved images with the filters?
UserDisplayName: Ali.kavari76
ThreadText: # Are these visualisations the filters of the convolution layer or the convolved images with the filters?
  
  (Asked by: username_0 on 2021-06-15)
  
  There are several images related to convolutional networks on the Internet, an example of which I have given below
  [![enter image description here](https://i.sstatic.net/3QZkG.png)](https://i.sstatic.net/3QZkG.png)
  
  My question is: are these images the weights/filters of the convolution layer (the weights that are learned in the learning process), or the convolved images of the previous layer's image with the filters of the current layer?
  
  **image source:**
  <https://stats.stackexchange.com/questions/362988/in-cnn-do-we-have-learn-kernel-values-at-every-convolution-layer>
  
  **Tags:** neural-networks, convolutional-neural-networks, filters, explainable-ai, convolutional-layers
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-06-15. Score: 4
  
  Only the first convolutional layer, with filters that process the input [colour] channels directly, can be rendered *directly* as image patches in the same domain as the input. The left-most panel in your example looks like that.
  
  Further layers of the neural network cannot be rendered like this for two reasons:
  
  * They have a number of input channels based on the previous layer's output, for example they may process 32 or 128 channels. There is no simple mapping of these channels to colours.
  * They respond to a wider range of input stimuli than any single image patch. If you tried to render out all inputs that they respond to then you would likely get an indistinct-looking grey blob, if anything at all. This is different to the first layer which does directly react pixel-by-pixel according to the weights.
  
  What is typically done to render patches like the middle and right-most panels in your example, is to find sample patches that trigger a strong response from that filter. This search can be done using gradient *ascent* - start with noise, then take gradient steps in the direction of increasing the signal for that filter. This is also the basis of "Deep Dream" images, which instead of doing that for small patches, apply it to whole images, and many filters at once.
  
  
  ---
  
  