Match a job Paths Subjects Questions Quizzes Pricing
Overview Read Practice

Practice — Convolutional Networks & Vision Basics (6 questions)

Pro content

Sign up free, then start a 14-day Pro trial — no card needed.

Intermediate Open Free

Shapes, Parameters and Receptive Field of a ResNet-Style Stem Permalink →

You are reviewing a teammate's PyTorch model for 3x224x224 images and 100 classes. They claim "the stem has a receptive field of about 20 pixels, so we need dilation to see more context". The layers are:

# Layer
A Conv 7x7, 3 to 64, stride 2, padding 3, bias=False
B MaxPool 3x3, stride 2, padding 1
C Conv 3x3, 64 to 64, stride 1, padding 1, bias=False, then BatchNorm
D Conv 3x3, 64 to 128, stride 1, padding 2, dilation 2, bias=False
E Conv 3x3, 128 to 256, stride 2, padding 1, bias=False
F Global average pool, then Linear 256 to 100
  1. Compute the output shape after every layer, using the output-size formula.
  2. Count the parameters per layer and in total (count BatchNorm's trainable scale and shift).
  3. Compute the theoretical receptive field after each of A-E with the recurrence, and say whether the teammate's claim is right. What would the RF after E be if D used dilation 1 and padding 1?
  4. How many multiply-accumulates does layer D cost? Compare the parameter count of layer A with the size of its output (activations); what does that imply for training memory?

Share this question

Intermediate Open Free

Explain Residual Blocks and the Bottleneck's Parameter Savings Permalink →

A junior engineer proposes replacing the ResNet-50 stage-2 blocks (256-channel input and output) with a plain stack of two 3x3 convs at 256 channels "because the bottleneck's 1x1 convs look like wasted depth". Another says "skip connections are just there for the gradients". You need to settle both.

  1. Write out the bottleneck block (256 to 64 to 64 to 256) and compute its weight count (ignore BatchNorm and biases). Compare with two 3x3 convs at 256 channels. How many times smaller is it?
  2. In a stage transition the input has 256 channels at 56x56 and the output must have 512 channels at 28x28. The identity shortcut cannot be used. What replaces it, how many weights does it have, and why is it still compatible with the residual idea?
  3. Explain what the skip connection does beyond helping gradients, referring to the degradation problem, and say what initializing the last BatchNorm scale of each residual branch to zero achieves.
  4. When would you still prefer the basic (two 3x3) block?

Share this question

Advanced Open Pro

Transfer-Learning Plan for 2,000 Chest X-Rays

Unlock this question →
Intermediate Open Pro

NMS in a Crowded Scene: Why a Person Disappears

Unlock this question →
Intermediate Open Pro

Choosing a Segmentation Metric When the Tumour Is 1% of Pixels

Unlock this question →
Intermediate Open Pro

CNN or ViT for a 5,000-Image Dataset?

Unlock this question →

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.