During a model audit, you examine the first convolutional layer of an image-classification network. The layer receives a 128×128×3 input and applies 64 kernels of size 5×5 with stride 1 and "same" padding so that the spatial resolution of the output remains 128×128. Bias terms are present (one per kernel), but you must report only the number of trainable weightsexcluding biases in this layer. How many weights does the layer contain?
A 2-D convolutional layer learns one set of weights per filter. The number of weights per filter equals kernel_height × kernel_width × input_channels.
Each filter: 5 × 5 × 3 = 75 weights.
Number of filters: 64. Total weights = 75 × 64 = 4 800. The other values arise from common mistakes: 1 600 ignores the three input channels (25 × 64); 9 600 double-counts parameters by multiplying by an incorrect factor; 78 643 200 assumes every output neuron has its own kernel instead of sharing parameters, eliminating the key efficiency of CNNs.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does 'stride' mean in a convolutional layer?
Open an interactive chat with Bash
Why is 'same' padding used, and how does it preserve spatial resolution?
Open an interactive chat with Bash
What is the role of kernels in a convolutional layer?