The interview problem
Calculate receptive field and effective stride through a stack of convolutions, stating padding assumptions.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Track receptive field r and input jump j, initialized to 1. For a layer with kernel k, dilation d and stride s, update r by (k−1)d times the previous j, then multiply j by s. Padding affects output positions and boundary coverage, not this interior receptive-field span. Distinguish theoretical span from the empirical influence of pixels after training.
2. Trace the design or derivation
Initialize span and jump → expand by dilated kernel → update stride → repeat
A dilation of two with a three-wide kernel touches positions separated by two, giving an effective kernel span of five. Span and dense coverage are different: holes can remain in a single layer's sampled positions. When combining layers, trace actual dependencies if coverage rather than maximum span matters.
3. Calculate the example
Two 3-wide layers with strides 2 then 1 and dilation 1 give r1=3,j1=2; r2=3+2×2=7,j2=2. Adjacent second-layer outputs are centered two input positions apart and each has a theoretical seven-position span.
4. Failure cases and trade-offs
Ignoring dilation or updating jump before receptive field causes errors. Residual branches require alignment checks before merging. Larger receptive fields provide context but may reduce spatial precision or increase computation. A theoretical connection does not mean every input position contributes equally.
5. Validation, follow-ups and self-review
Trace dependencies on a tiny one-dimensional input and compare interior versus padded edges. Follow-up: how does dilation change coverage without increasing kernel parameter count? Self-review: state stride, dilation, padding and update order.
Sources and related practice
Technical reference: docs.pytorch.org — Kernel, stride and dilation conventions; receptive-field derivation is original.
Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Attention and transformers: the serving trade-offs; Reason about transposed convolution output shape.
Continue your preparation
Choose a connected learning path or browse more ML fundamentals questions. Read our editorial method and attribution policy.