2
$\begingroup$

Let's say I have 8 back to back convolutional layers with zero padding such that the input and output dimensions are the same. There are no max-pooling layers between the layers. All the layers use a 3x3 filter. I want to calculate how many pixels influence each of the output layers. How do I go about doing this?

I know that if there is only 1 layer, then each of pixel in the output is influenced by 9 pixels from the input. If there are 2 layers, then I'm guessing there would be 25 pixels influencing each pixel in the output. This is because if the second layer runs a 3x3 filter over layer 1, then those 9 pixels correspond to a 5x5 grid in the input layer. Am I properly calculating this?

$\endgroup$
2
$\begingroup$

Yes, you are calculating it pretty much correctly.

Have a look at A guide to receptive field arithmetic for Convolutional Neural Networks and A guide to convolution arithmetic for deeplearning for formulas how to compute sizes of things in convnets including more complicated cases like non-unit strides etc.

Also, note that theoretical receptive field is in practice not the same as the actual one. Have a look at the paper Understanding the Effective Receptive Field in Deep Convolutional Neural Networks (Luo et al., 2016) for some examples.

$\endgroup$
  • $\begingroup$ These references are fantastic, this should be upvoted a ton. $\endgroup$ – Christian Oct 29 '19 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.