It seems you are loading the samples as long.
The error from the normalization also prints that another LongTensor is needed.
Same goes for the model.
inputs seems to be a LongTensor as well.
Could you check your Dataset and transform the sample to float: sample = np.array(sample, dtype=np.float32).
Also your channel dimension should be at dim=1. So your input shape would be [batch_size, 1, 28, 28].