title: Why VGG-16 takes input size 512 * 7 * 7?
body: <p>According to <a href="https://github.com/pytorch/vision/blob/master/torchvision/models/vgg.py" rel="nofollow noreferrer">https://github.com/pytorch/vision/blob/master/torchvision/models/vgg.py</a></p>
  
  <p>I don`t understand why VGG models take 512 * 7 * 7 input_size of fully-connected layer. 
  Last convolution layer is      </p>
  
  
  
  <ul>
  <li>nn.Conv2d(512, 512, kernel_size=3, padding=1),</li>
  <li>nn.ReLU(True),</li>
  <li>nn.MaxPool2d(kernel_size=2, stride=2, dilation=1)</li>
  </ul>
  
  <p>Codes in above link.</p>
  
  <pre class="lang-python prettyprint-override"><code>class VGG(nn.Module):
  
      def __init__(self, features, num_classes=1000, init_weights=True):
          super(VGG, self).__init__()
          self.features = features
          self.classifier = nn.Sequential(
              nn.Linear(512 * 7 * 7, 4096),
              nn.ReLU(True),
              nn.Dropout(),
              nn.Linear(4096, 4096),
              nn.ReLU(True),
              nn.Dropout(),
              nn.Linear(4096, num_classes),
          )
  </code></pre>