Recall & Review
beginner
What does nn.Conv2d layer do in a neural network?
It applies a set of filters (kernels) to 2D input data (like images) to extract features such as edges or textures by sliding the filters over the input.
Click to reveal answer
beginner
What are the main parameters of nn.Conv2d?
The main parameters are: in_channels (input depth), out_channels (number of filters), kernel_size (filter size), stride (step size for sliding), padding (border added), and dilation (spacing inside the kernel).
Click to reveal answer
intermediate
How does padding affect the output size of nn.Conv2d?
Padding adds pixels around the input edges, allowing the filter to cover border areas. This can keep the output size the same as input or control shrinking.
Click to reveal answer
intermediate
What is the effect of stride in nn.Conv2d?
Stride controls how far the filter moves each step. A stride of 1 moves one pixel at a time, producing larger outputs. Larger strides skip pixels, reducing output size.
Click to reveal answer
beginner
Why do we use multiple filters (out_channels) in nn.Conv2d?
Multiple filters let the network learn different features from the input, like edges, colors, or shapes, improving the model's ability to understand complex patterns.Click to reveal answer
What does the kernel_size parameter in nn.Conv2d specify?
✗ Incorrect
kernel_size defines the height and width of the filter sliding over the input.
If stride is set to 2 in nn.Conv2d, what happens to the output size compared to stride 1?
✗ Incorrect
A stride of 2 moves the filter two pixels at a time, reducing output size roughly by half.
What is the role of padding in nn.Conv2d?
✗ Incorrect
Padding adds pixels around input edges to control output size and preserve border information.
What does out_channels parameter control in nn.Conv2d?
✗ Incorrect
out_channels sets how many filters the layer uses, determining output depth.
Which of these is NOT a typical use of nn.Conv2d?
✗ Incorrect
nn.Conv2d is designed for 2D data like images, not for direct text classification.
Explain how the parameters kernel_size, stride, and padding affect the output size of an nn.Conv2d layer.
Think about how the filter moves and covers the input image.
You got /4 concepts.
Describe why multiple filters (out_channels) are used in nn.Conv2d and how they help the model learn.
Imagine looking at an image with different colored glasses to see different details.
You got /4 concepts.