BTW, I divide by 4096 because my images are 12-bit mosaics of satellite imagery (sentinel-2 images). I just thought bringing them to 0-1 range might help in learning. The test function at the end I used to see if i could reconstruct the images and it was working perfectly.