Hi @Umair_Javaid,
Simply create a hook function and register it to the by calling register_forward_hook.

  
    
    
    Display intermediate features 
  
  
    There are two things to do: get the intermediate features, display them. 
First, uou will need to use register_forward_hook on the concerned convolution. 
To create it you have to write: 
def hook(module, input, output):
    # output is the [N, 64, 30, 30] Tensor containing your features

model.concerned_conv.register_forward_hook(hook)

Then depending on your display method, you will have. You can use torchvision and Tensorboard to do so. The hook body would be something like: 
def hook(module,…