Solved by Arohan_Ajit in post #16 
              
              
                Another good way to know the input dimensions of the image is to use torchsummary module for summary library. 
import torch.nn as nn
import torch.nn.functional as F
from torchsummary import summary

# define the CNN architecture
class Net(nn.Module):
    def __init__(self):
        super(Net, self).…