<p>The below VGG-16 architechture is in the <a href="https://arxiv.org/pdf/1409.1556.pdf" rel="noreferrer">original paper as highlighted by @deltheil in  (table 1, column D)  </a>, and I quote from there</p>

<blockquote>
  <p>2.1 ARCHITECTURE</p>
  
  <p>During training, the input to our ConvNets is a fixed-size 224 × 224
  RGB images. The only preprocessing we do is subtracting the mean RGB
  value, computed on the training set, from each pixel.</p>
  
  <p>The image is passed through a stack of convolutional (conv.) layers,
  where we use filters with a very small receptive field: 3 × 3 (which
  is the smallest size to capture the notion of left/right, up/down,
  center). The convolution stride is fixed to 1 pixel; the spatial
  padding of conv. layer input is such that the spatial resolution is
  preserved after convolution, i.e. the padding is 1 pixel for 3 × 3
  conv. layers.  Spatial pooling is carried out by five max-pooling
  layers, which follow some of the conv. layers (not all the conv.
  layers are followed by max-pooling). Max-pooling is performed over a 2
  × 2 pixel window, with stride 2.</p>
  
  <p>A stack of convolutional layers (which has a different depth in
  different architectures) is followed by three Fully-Connected (FC)
  layers: the first two have 4096 channels each, the third performs
  1000-way ILSVRC classification and thus contains 1000 channels (one
  for each class). </p>
  
  <p>The final layer is the soft-max layer.</p>
</blockquote>

<p>Using the above, and </p>

<ul>
<li>A formula to find activation shape of a layer!</li>
</ul>

<p><img src="https://i.stack.imgur.com/oucTkt.jpg" width="200" /></p>

<ul>
<li>A formula to calculate the weights corresponding to every layer:</li>
</ul>

<p><img src="https://i.stack.imgur.com/R8F7a.png" width="200" /></p>

<p><strong>Note:</strong></p>

<ul>
<li><p>you can simply multiply respective activation shape column to get the activation size</p></li>
<li><p>CONV3: means a filter of 3*3 will convolve on the input!</p></li>
<li><p>MAXPOOL3-2: means, 3rd pooling layer, with 2*2 filter, stride=2, padding=0(pretty standard in pooling layers)</p></li>
<li><p>Stage-3 : means it has multiple CONV layer stacked! with same padding=1, , stride=1, and filter 3*3</p></li>
<li><p>Cin : means the depth a.k.a channel coming from the input layer!</p></li>
<li><p>Cout: means the depth a.k.a channel outgoing (you configure it differently- to learn more complex features!),</p></li>
</ul>

<p>Cin and Cout are the number of filters that you stack together to learn multiple features at different scales such as in the first layer you might want to learn vertical edges, and horizontal edges and edges at say 45degree, blah blah!, 64 possible different filters each of different kind of edges!! </p>

<ul>
<li><p>n: input dimension without depth such n=224 in case of INPUT-image!</p></li>
<li><p>p: padding for each layer</p></li>
<li><p>s: stride used for each layer</p></li>
<li><p>f: filter size i.e 3*3 for CONV and 2*2 for MAXPOOL layers!  </p></li>
<li><p>After MAXPOOL5-2, you simply flatten the volume and interface it with the first FC layer.!</p></li>
</ul>

<p><strong><em>We get the table:</em></strong>
<a href="https://i.stack.imgur.com/zCwzX.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/zCwzX.jpg" alt="enter image description here"></a></p>

<p><strong><em>Finally, if you add all the weights calculated in the last column, you end up with 138,357,544(138 million) parameters to train for VGG-15!</em></strong></p>
How to calculate the number of parameters of convolutional neural networks?
<p>I can't give the correct number of parameters of <a href="http://www.cs.toronto.edu/~fritz/absps/imagenet.pdf">AlexNet</a> or <a href="http://arxiv.org/abs/1409.1556">VGG Net</a>.</p>

<p>For example, to calculate the number of parameters of a <code>conv3-256</code> 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 <code>138M</code> parameters.</p>

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