Solved by sio277 in post #2 
              
              
                You can attach forward hook to get the output size of certain module. 
Example: 
import torch
import torch.nn as nn

seq = nn.Sequential(nn.Conv2d(1, 2, 3), nn.BatchNorm2d(2), nn.Conv2d(2, 3, 3))

def forward_hook(module, input, output):
    print(output.size())
    
seq.register_forward_hook(forwar…