Need help understanding the computation

image

How did we computed the # of parameters of FC3, FC4 and Softmax.

Can anyone plz explain it to me.

Consider FC3. That is a “fully connected” layer, meaning a standard network layer as we learned about in DLS Course 1. The input is the result of “flattening” the output of the previous pooling layer, which is 5 x 5 x 16 = 400 elements. So FC3 has 400 input neurons and 120 output neurons. The formula for the linear activation is:

Z = W \cdot A + b

Where A is 400 x m, where m is the number of samples. So what are the sizes of W and b in the above formula?

W is 120 x 400 and b is 120 x 1. So here is the number of total parameters:

120 * 400 + 120 = 48120

Similarly for FC4, we have 120 input neurons and 84 output neurons. That means W will be 84 x 120 and b will be 84 x 1. So here is the number of parameters:

84 * 120 + 84 = 10164

Then the last Softmax layer has 84 input neurons and 10 output neurons, so the formula is:

10 * 84 + 10 = 850

1 Like