I had another doubt. I initialize my model as model = Model(28). My input tensor is [202,1,28,28]. Now Pytorch expects channel size to be placed on the second dim. But I cannot pass to my Model because then it says sizes cannot be non negative.
def conv_layer(ni,nf,kernel_size=3,stride=1):
    return nn.Sequential(
            nn.Conv2d(ni,nf,kernel_size=kernel_size,bias=False,stride=stride,padding=kernel_size//2),
            nn.BatchNorm2d(nf,momentum=0.01),
            nn.LeakyReLU(negative_slope=0.1,inplace=True)
        )

If model(28) is done, then ni takes the value of 28, but then it treats my Tensor as if it has 28 channels, but it has only 1. So how do i pass [202,1,28,28] so that my model treats it as 1 channel image`.