Thank you. Actually I changed the whole architecture:
class Net(nn.Module):
    
    def __init__(self, Fm1, Fm2, Fm3, Ks, Ni, Nh1, No, act, drop_rate):
        # super() lets you avoid referring to the base class explicitly
        super().__init__()

        '''
          in_channels = 1 since image is grayscale 
          out_channels = Number of feature maps you want in output
          act = Activation function chosen
          Fm1 = Feature maps layer conv 1
          Fm2 = Feature maps layer conv 2
          Fm3 = Feature maps layer conv 3
          Ks = Kernel size  
          Ni = Input of Linear Layer = Fm3
          Nh1 = Number of neurons for the first hidden dense layer
          No = Output = 10
          act = Activation function
          Droprate = % of dropout 
        '''
        
        self.conv1 = nn.Sequential(
            
            nn.Conv2d(in_channels=1, out_channels=Fm1, kernel_size=Ks, stride=1),
            nn.ReLU(),
            nn.BatchNorm2d(Fm1),
            nn.MaxPool2d(kernel_size=2),
            nn.Dropout(drop_rate)
        )

        self.conv2 = nn.Sequential(
            nn.Conv2d(in_channels=Fm1, out_channels=Fm2, kernel_size=Ks, stride=1),
            nn.ReLU(),
            nn.BatchNorm2d(Fm2),
            nn.MaxPool2d(kernel_size=2),
            nn.Dropout(drop_rate)
        )

        self.conv3 = nn.Sequential(
            nn.Conv2d(in_channels=Fm2, out_channels=Fm3, kernel_size=Ks, stride=1),
            nn.ReLU(),
            nn.BatchNorm2d(Fm3),
            nn.MaxPool2d(kernel_size=2),
            nn.Dropout(drop_rate)
        )
        
        self.fc1 = nn.Sequential(
            nn.Linear(Fm3, Nh1)
        )
        
        self.fc2 = nn.Sequential(
           nn.Linear(Nh1,No) 
        )
              
    def forward(self, x):
        x = self.conv1(x)
        x = self.conv2(x)
        x = self.conv3(x)
        
        #print("X prev: ", x.shape)
        x = x.view(x.size(0),-1)
        #print("X after: ", x.shape)
        x = self.fc1(x)
        x = self.fc2(x)
        x = F.log_softmax(x, dim=1)
        return x

All parameters are explained. Is there something that I’m doing wrong? Ni should be always equal to the number of feature maps of the last conv layer? Do you have suggestions for improving it?