I’m trying to modify my image classifier by adding decoder and reconstruction loss as autoencoder.
I want to use the BCELoss which requires targets range from 0 to 1.
But my classifier has input normalization at the data loader as in usual so the input range is not fitted.
So I want to get it back to the original range by inverse normalize.
I’m working on cifar10, so I have mean(0.4914, 0.4822, 0.4465) and std(0.2023, 0.1994, 0.2010).
and the input shape is (batch, channel, H, W).
What is the best way to inverse normalize in this case?
Or, Is there any way to get both normalized and unnormalized input from the train loader?