The receptive field calculator gives the receptive field of a stack of identical convolution layers, the jump between neighboring outputs and the number of layers needed to cover a target size.
How the calculation works
- Enter the number of layers, the kernel size and the stride.
- Enter the target receptive field, for example the image size.
- The calculator gives the receptive field, the jump, the layers needed, the share covered and the missing pixels.
Example
5 layers with 3×3 kernels and stride 2 give a field of 1 + 2 × (1 + 2 + 4 + 8 + 16) = 63 pixels, and two neighboring outputs are 32 pixels apart. To see a whole 224-pixel image, 7 such layers are needed. With stride 1, the same kernels would need about 112 layers.
Why it matters
The calculator helps students and engineers who design convolutional networks for images, audio or time series and who need to check that the model sees enough context for the task.
Good to know
The calculation assumes the same kernel and stride in every layer. For a real network, the field is built layer by layer: the field grows by (K − 1) times the jump so far, and the jump is multiplied by the stride. Dilated convolutions widen the field without losing resolution, and the dilation can replace the stride. Pooling layers act like strides. Large kernels, attention layers and global pooling give a field covering the whole input at once. For segmentation or detection, a field smaller than the objects to recognize is a warning sign. Remember that padding does not change the field size, only the borders.
Related tools
The convolution layer calculator gives the output sizes, the neural network parameter count calculator covers dense layers, the pixel density calculator relates pixels to screens and the logarithm calculators help with the growth rate.