title: How to get an output dimension for each layer of the Neural Network in Pytorch?
body: <pre><code>class Model(nn.Module):
    def __init__(self):
      super(Model, self).__init__()
      self.net = nn.Sequential(
        nn.Conv2d(in_channels = 3, out_channels = 16), 
        nn.ReLU(), 
        nn.MaxPool2d(2),
        nn.Conv2d(in_channels = 16, out_channels = 16), 
        nn.ReLU(),
        Flatten(),
        nn.Linear(4096, 64),
        nn.ReLU(),
        nn.Linear(64, 10))
  
    def forward(self, x):
      return self.net(x)
  </code></pre>
  
  <p>I have created this model without a firm knowledge in Neural Network and I just fixed parameters until it worked in the training. I am not sure how to get the output dimension for each layer (e.g. output dimension after the first layer).</p>
  
  <p>Is there an easy way to do this in Pytorch?</p>