Answers.Body: <p>The receptive field of a neuron at a given depth (layer) is the number of input pixels that affect its output.</p>
  <p>For example if you apply a <span class="math-container">$K\times K$</span> kernel at each layer, the receptive field of an element in the <span class="math-container">$L$</span>-th activation would have a size of
  <span class="math-container">$$(1 + L(K-1))\times (1+L(K-1))$$</span>
  Now if you introduce a stride <span class="math-container">$S$</span> each time, the size of the receptive field is approximately divided by <span class="math-container">$S$</span> (you need to take into account padding, and rounding...)</p>
  <p>In your specific example, you have a <span class="math-container">$2\times 2$</span> kernel (it doesn't matter whether the layer is a pooling or a conv) with <span class="math-container">$S=3$</span> as stride. This means that you discard <span class="math-container">$5$</span> pixels at each slide of the kernel: basically you have <span class="math-container">$3\times 3=9$</span> pixels each time but just consider <span class="math-container">$2\times 2=4$</span> of them, so five got lost.</p>
  <p>So, at the input level, the receptive field of the pooling will still be <span class="math-container">$2\times 2$</span> but the large stride would have the effect of reducing the receptive field of the next layer(s).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-20T20:00:37.203Z
Answers.Text: If I have a pooling layer with 2x2, stride=3, and then I have a conv layer with a 3x3 kernel, and I ask what is the receptive field of the output neurons, shouldn't it be larger? I suppose I get confused because I am also thinking about dilation, and if I understand correctly, that also can expand the receptive field but throws away information. Can you elaborate further on the part where you say "the large stride would have the effect of reducing the receptive field of the next layer(s)."
Answers.UserDisplayName: Asco 2
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-21T17:16:21.330Z
Answers.Text: Well the conv after the 2x2 pool won't never "see" the pixels that were discarded due to the stride of 3, so its output neurons aren't influenced by those and so you don't include them in the receptive field. Dilation is something different from the stride: it expands the kernel (enlarging the receptive field), instead the stride shifts it entirely by some amount.
Answers.UserDisplayName: Luca Anzalone
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-20T10:47:21.633Z
Answers.LastActivityDate: 2023-05-20T10:47:21.633Z
Answers.UserDisplayName: Luca Anzalone
Body: <p>Bit confused about the concept of a receptive field. I understand it to be the size of the region which influences the output of the neuron of interest. If I have an input of 16x16, and immediately pool afterwards (for simplicity) with a 2x2 window and a stride of 3, does the receptive field of an output neuron end up being 3x3? Or does it remain 2x2, since we do not draw upon any useful info with the gaps between the windows?</p>
  
Tags: <convolutional-neural-networks>
Title: What would the receptive field of a neuron with a 2x2 max pool, stride of 3?
UserDisplayName: Asco 2
ThreadText: # What would the receptive field of a neuron with a 2x2 max pool, stride of 3?
  
  (Asked by: username_0 on 2023-05-20)
  
  Bit confused about the concept of a receptive field. I understand it to be the size of the region which influences the output of the neuron of interest. If I have an input of 16x16, and immediately pool afterwards (for simplicity) with a 2x2 window and a stride of 3, does the receptive field of an output neuron end up being 3x3? Or does it remain 2x2, since we do not draw upon any useful info with the gaps between the windows?
  
  **Tags:** convolutional-neural-networks
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-05-20. Score: 1 | Accepted answer
  
  The receptive field of a neuron at a given depth (layer) is the number of input pixels that affect its output.
  
  For example if you apply a $K\times K$ kernel at each layer, the receptive field of an element in the $L$-th activation would have a size of
  $$(1 + L(K-1))\times (1+L(K-1))$$
  Now if you introduce a stride $S$ each time, the size of the receptive field is approximately divided by $S$ (you need to take into account padding, and rounding...)
  
  In your specific example, you have a $2\times 2$ kernel (it doesn't matter whether the layer is a pooling or a conv) with $S=3$ as stride. This means that you discard $5$ pixels at each slide of the kernel: basically you have $3\times 3=9$ pixels each time but just consider $2\times 2=4$ of them, so five got lost.
  
  So, at the input level, the receptive field of the pooling will still be $2\times 2$ but the large stride would have the effect of reducing the receptive field of the next layer(s).
  
  > **Comments:**
  > **username_0**: If I have a pooling layer with 2x2, stride=3, and then I have a conv layer with a 3x3 kernel, and I ask what is the receptive field of the output neurons, shouldn't it be larger? I suppose I get confused because I am also thinking about dilation, and if I understand correctly, that also can expand the receptive field but throws away information. Can you elaborate further on the part where you say "the large stride would have the effect of reducing the receptive field of the next layer(s)."  
  > **username_1**: Well the conv after the 2x2 pool won't never "see" the pixels that were discarded due to the stride of 3, so its output neurons aren't influenced by those and so you don't include them in the receptive field. Dilation is something different from the stride: it expands the kernel (enlarging the receptive field), instead the stride shifts it entirely by some amount.  
  
  ---
  
  