# Calculating the Number of Parameters of a 2D CNN Layer

How can I calculate the number of parameters for a 2D CNN layer?

I usually use the equation: $$output \ width= ((W-F+2*P )/S)+1 = (x)$$

The same answer will be valid for the output height considering that they have the same dimension. So the output dimension will be (x,x).

However, what if I want to calculate the number of parameters for a 2D CNN layer with filter size 5x5, input channel/depth = 3, and output channel or depth of 8?

• What are W, F, P, S and x? – timleathart May 10 '19 at 2:48