ni sets the number of input channels to Conv2d, your tensor has 1 channel but you’re trying to set the Conv2d to take input of 28 channels.
You should set it to 1 given that you want to feed tensors with 1 channel and then make sure the number of output channels (nf) is doubling instead of halving.