0 votes
1 view
in Machine Learning by (19k points)

I can't give the correct number of parameters of AlexNet or VGG Net.

For example, to calculate the number of parameters of a conv3-256 layer of VGG Net, the answer is 0.59M = (3*3)*(256*256), that is (kernel size) * (product of both number of channels in the joint layers), however in that way, I can't get the 138M parameters.

So could you please show me where is wrong with my calculation, or show me the right calculation procedure?

1 Answer

0 votes
by (33.2k points)

If you use VGG Net with 16-layer (table 1, column D) then 138M refers to the total number of parameters of the particular neural network, that means including all convolutional layers, but also the fully connected ones.

 The 3rd convolutional stage composed of 3 x conv3-256 layers:

  • the first layer has N=128 input planes and F=256 output planes,

  • the two other layers have N=256 input planes and F=256 output planes.

The convolution kernel is 3x3 for each layers. In terms of parameters this gives:

  • 128x3x3x256 (weights) + 256 (biases) = 295,168 parameters for the 1st one,

  • 256x3x3x256 (weights) + 256 (biases) = 590,080 parameters for the two other ones.

You should do that for all layers, but also the fully-connected ones, and sum up these values to obtain the final 138M number.

Hope this answer helps.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !