The CrossEntropyLoss is used for classification with class labels.
I think it might be not the right criterion for your autoencoder, since the labels will most likely be floats.
As a workaround you could use nn.MSELoss as a criterion.
Would this work for you?