Using my implementation (with for loop over the channels, the MinMaxScaler class) I get something (not NaN). With yours, I get NaN after the first epoch already. Everything else is exactly the same.
I’m working with images, I wouldn’t know how to post an example: is just 1 tensor (512x512) enough?