M3-097M3: Deep Learning FoundationsConvolution & Vision FoundationsEasy
⚡Flashcard Drill➔Mastery:
Calculating Convolutional Layer Parameter Count and Output Spatial Dimensions
🎯 Active Recall Self-Check (Draft First, Verify After)
Login-free practice tracker: recall core answer, audit pitfalls, and log review status.
Step 1 · Draft your concise answer & assumptions
Step 2 · Check Pitfalls & Follow-up Inquiries
📐 Mathematical Definition
⚡ One-Sentence Core Answer
Output spatial dimension is ; total parameters equal (with bias).
📌 Key Takeaways
- •Output spatial formula: , where is input size, kernel, padding, stride
- •Parameter count formula: (with bias)
- •Input size independence: convolutional parameter counts are strictly independent of input image spatial height and width
📐 Mathematical Derivations
Exact Mathematical Formulas:
① Output Spatial Dimensions:
Given input height , width , kernel size , padding , dilation , and stride :
Effective kernel size with dilation: .
, .
- Same Padding Condition (): Requires (for odd kernel ).
② Parameter Count:
Each output channel requires a 3D kernel of shape plus 1 scalar bias.
.
③ Computational FLOPs (Multiply-Adds):
. Notice that FLOPs scale directly with output spatial resolution , whereas parameters do not.
① Output Spatial Dimensions:
Given input height , width , kernel size , padding , dilation , and stride :
Effective kernel size with dilation: .
, .
- Same Padding Condition (): Requires (for odd kernel ).
② Parameter Count:
Each output channel requires a 3D kernel of shape plus 1 scalar bias.
.
③ Computational FLOPs (Multiply-Adds):
. Notice that FLOPs scale directly with output spatial resolution , whereas parameters do not.
🏭 Production Trade-offs
Calculated Example: For an input of shape processed by a Conv2D layer with :
- Output size: . Output shape is .
- Parameters: .
- Output size: . Output shape is .
- Parameters: .
⚠️ Common Interview Pitfalls
- ✕Forgetting to floor the division , leading to off-by-one errors in asymmetric stride calculations
- ✕Confusing parameter count (independent of ) with computational FLOPs (proportional to )
🎯 Interviewer Follow-up Inquiries
- ?How does dilated (atrous) convolution expand receptive field without adding a single trainable parameter?
- ?What padding value is required to preserve exact spatial resolution for an odd kernel of size with stride ?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
📚