Answers.Body: <h3>Feature map</h3>
  <p>A <strong>feature map</strong> is the output of the convolution operation (performed by a convolutional layer).</p>
  <p>When you apply a kernel <span class="math-container">$K_1$</span> to the input image <span class="math-container">$I$</span> (i.e. you perform the convolution operation with <span class="math-container">$K_1$</span>), you produce one feature map <span class="math-container">$F_1$</span>. We can denote this operation by <span class="math-container">$F_1 = I \circledast K_1$</span>. Note that <a href="https://ai.stackexchange.com/q/21999/2444">the convolution (or cross-correlation)</a> can be seen as the multiplication of the kernel <span class="math-container">$K_1$</span> with different sub-regions of the image <span class="math-container">$I$</span>. Each of these multiplications produces a scalar value of the feature map <span class="math-container">$F_1$</span>.</p>
  <p>If you perform another convolution operation with another kernel <span class="math-container">$K_2$</span>, you produce another feature map <span class="math-container">$F_2$</span>. So, if you perform the convolution operation <span class="math-container">$n$</span> times with <span class="math-container">$n$</span> different kernels in a convolutional layer, you will get <span class="math-container">$n$</span> feature maps, which are typically concatenated to form a block of feature maps, which we can denote by <span class="math-container">$\mathbf{F}$</span>. So, the total number of feature maps is equal to <span class="math-container">$n$</span>, i.e. the number of kernels that you convolve with <span class="math-container">$I$</span>.</p>
  <p>Each element of a feature map <span class="math-container">$F_i \in \mathbb{R}^{w \times h}$</span>, which we can denote by <span class="math-container">$F_{i_{jk}}$</span> (i.e. the element at coordinates <span class="math-container">$j$</span> and <span class="math-container">$k$</span> of the matrix <span class="math-container">$F_i$</span>), can be thought of as the &quot;<strong>activation</strong> of a neuron&quot;.</p>
  <p>Alternatively, you can think of a feature map as a collection/map of <em>features</em> produced by the kernel <span class="math-container">$K_i$</span> (hence the name <em>feature map</em>). In other words, <span class="math-container">$K_i$</span> extracts certain features from <span class="math-container">$I$</span>. Another kernel <span class="math-container">$K_l$</span> may extract other features, and so on.</p>
  <h3>Receptive field</h3>
  <p>A <strong>receptive field</strong> is the portion of the input image that is/was used to compute the <strong>activation</strong> of a neuron (aka node) in a feature map.</p>
  <p>So, we talk of &quot;the receptive field of a neuron in a feature map&quot;. You can read <a href="https://ai.stackexchange.com/a/25850/2444">this answer</a> to understand more what a neuron in a convolutional layer is.</p>
  <h3>Illustration</h3>
  <p>This illustration should summarise the descriptions above.</p>
  <img src="https://i.sstatic.net/jQSUZ.png" width="500">
  <p>In the illustration above, a feature map is a 2-dimensional matrix of shape <span class="math-container">$46 \times 46$</span>. There are <span class="math-container">$100$</span> feature maps (so <span class="math-container">$100$</span> kernels were convolved with the input image). The receptive field of a neuron (small pink square in the feature map) is a 3-dimensional sub-region of the image of shape <span class="math-container">$5 \times 5 \times 3$</span>. Note that, in this case of a 2d-convolution, the kernel has the same depth as the input image (i.e. <span class="math-container">$3$</span>).</p>
  <h3>Receptive field of neurons in deeper layers</h3>
  <p>The output of a convolutional layer, which we denoted by <span class="math-container">$\mathbf{F}$</span> above (i.e. the concatenation of all feature maps), is the input to the next layer of the CNN. If this layer is a convolutional layer, then it will produce other feature maps <span class="math-container">$\mathbf{F}'$</span>. The receptive fields of the neurons associated with these feature maps <span class="math-container">$\mathbf{F}'$</span> will not correspond to the receptive fields of the neurons associated with the feature maps produced by the first convolutional layer. In fact, as you go deeper into a CNN, the receptive field of neurons increases. You can read more about how it increases <a href="https://blog.mlreview.com/a-guide-to-receptive-field-arithmetic-for-convolutional-neural-networks-e0f514068807" rel="nofollow noreferrer">here</a> or watch <a href="https://www.youtube.com/watch?v=70A3uYfM1qA" rel="nofollow noreferrer">this video</a>. That's why we can think of neurons in deeper layers as &quot;looking at more general features of the input image&quot;.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-02T08:02:27.067Z
Answers.LastActivityDate: 2021-10-27T13:08:45.157Z
Answers.LastEditDate: 2021-10-27T13:08:45.157Z
Answers.UserDisplayName: malioboro
Body: <p>In a CNN, the <em>receptive field</em> is the portion of the image used to compute the filter's output. But one filter's output (which is also called a "feature map") is the next filter's input.</p>
  
  <p>What's the difference between a receptive field and a feature map?</p>
  
Tags: <convolutional-neural-networks><comparison><terminology><feature-maps><receptive-field>
Title: What is the difference between a receptive field and a feature map?
UserDisplayName: Monica Heddneck
ThreadText: # What is the difference between a receptive field and a feature map?
  
  (Asked by: username_0 on 2018-11-01)
  
  In a CNN, the *receptive field* is the portion of the image used to compute the filter's output. But one filter's output (which is also called a "feature map") is the next filter's input.
  
  What's the difference between a receptive field and a feature map?
  
  **Tags:** convolutional-neural-networks, comparison, terminology, feature-maps, receptive-field
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-11-02. Score: 11
  
  ### Feature map
  
  A **feature map** is the output of the convolution operation (performed by a convolutional layer).
  
  When you apply a kernel $K\_1$ to the input image $I$ (i.e. you perform the convolution operation with $K\_1$), you produce one feature map $F\_1$. We can denote this operation by $F\_1 = I \circledast K\_1$. Note that [the convolution (or cross-correlation)](https://ai.stackexchange.com/q/21999/2444) can be seen as the multiplication of the kernel $K\_1$ with different sub-regions of the image $I$. Each of these multiplications produces a scalar value of the feature map $F\_1$.
  
  If you perform another convolution operation with another kernel $K\_2$, you produce another feature map $F\_2$. So, if you perform the convolution operation $n$ times with $n$ different kernels in a convolutional layer, you will get $n$ feature maps, which are typically concatenated to form a block of feature maps, which we can denote by $\mathbf{F}$. So, the total number of feature maps is equal to $n$, i.e. the number of kernels that you convolve with $I$.
  
  Each element of a feature map $F\_i \in \mathbb{R}^{w \times h}$, which we can denote by $F\_{i\_{jk}}$ (i.e. the element at coordinates $j$ and $k$ of the matrix $F\_i$), can be thought of as the "**activation** of a neuron".
  
  Alternatively, you can think of a feature map as a collection/map of *features* produced by the kernel $K\_i$ (hence the name *feature map*). In other words, $K\_i$ extracts certain features from $I$. Another kernel $K\_l$ may extract other features, and so on.
  
  ### Receptive field
  
  A **receptive field** is the portion of the input image that is/was used to compute the **activation** of a neuron (aka node) in a feature map.
  
  So, we talk of "the receptive field of a neuron in a feature map". You can read [this answer](https://ai.stackexchange.com/a/25850/2444) to understand more what a neuron in a convolutional layer is.
  
  ### Illustration
  
  This illustration should summarise the descriptions above.
  
  ![](https://i.sstatic.net/jQSUZ.png)
  
  In the illustration above, a feature map is a 2-dimensional matrix of shape $46 \times 46$. There are $100$ feature maps (so $100$ kernels were convolved with the input image). The receptive field of a neuron (small pink square in the feature map) is a 3-dimensional sub-region of the image of shape $5 \times 5 \times 3$. Note that, in this case of a 2d-convolution, the kernel has the same depth as the input image (i.e. $3$).
  
  ### Receptive field of neurons in deeper layers
  
  The output of a convolutional layer, which we denoted by $\mathbf{F}$ above (i.e. the concatenation of all feature maps), is the input to the next layer of the CNN. If this layer is a convolutional layer, then it will produce other feature maps $\mathbf{F}'$. The receptive fields of the neurons associated with these feature maps $\mathbf{F}'$ will not correspond to the receptive fields of the neurons associated with the feature maps produced by the first convolutional layer. In fact, as you go deeper into a CNN, the receptive field of neurons increases. You can read more about how it increases [here](https://blog.mlreview.com/a-guide-to-receptive-field-arithmetic-for-convolutional-neural-networks-e0f514068807) or watch [this video](https://www.youtube.com/watch?v=70A3uYfM1qA). That's why we can think of neurons in deeper layers as "looking at more general features of the input image".
  
  
  ---
  
  