Parameter Count for a 2D Convolution Layer
You are given a standard 2D convolution layer with:
-
Input channels: C_in
-
Output channels: C_out
-
Kernel size: (k_h, k_w)
-
Stride: (s_h, s_w)
-
Padding: (p_h, p_w)
-
Optional bias term
Task:
-
Compute the total number of learnable parameters when the layer includes a bias term.
-
Compute the total number of learnable parameters when the layer has no bias term.
Assume a standard convolution (groups = 1).