I would assume the reconstructed image to have the same shape and type as the input image.
However, if you are using nn.CrossEntropyLoss, the target should be a LongTensor containing some class indices.
Could you explain your use case a bit or post a (small) executable code snippet?