I'm preparing for an exam in Computer Vision. I came across with the following question from one of the exams:
What is the number of parameters of a convolution layer in a neural network, when the input size is $100 \times100 \times128$ and the output $100 \times100 \times256$, the convolution size is $3 \times3$, with and without the bias?
I noticed that they really like to ask this type of questions, although not sure what does it teach. I understand the general idea of the CNN architecture but eveytime they ask me to count, I get confuse.
I solved the following similar question:
What is the number of parameters of a linear layer in a neural network) called both fully-connected and dense) when the vector size at input 128 and output 256 with and without the bias?
My suggested solution:
Without bias: $$\#\text{params}=|\text{input}|\cdot|\text{output}|=128\cdot256=32,768$$
With bias: $$\#\text{params}=|\text{input}|\cdot\left(|\text{output}|+1\right)=128\cdot(256+1)=128\cdot257=32,896$$
How to count the parameters in the convolution layer above? In which other layers this "count parameters" question can pop up? (Pooling, etc.).