Code QuizIntermediate

Conv Layer Input Channels

Spot the channel mismatch in this CNN built for RGB images.

Codepython
import torch.nn as nn

# Input: RGB images, shape (batch, 3, 32, 32)
conv = nn.Conv2d(in_channels=1, out_channels=32, kernel_size=3)

What is the bug in this convolutional layer?