Well u don’t need to always normalize ur image data that way.
What I usually do is to set mine to be within range of [-1, 1] and here’s how I do it:
I divide all by 255 so it fall within the range of 0 and 1 and then I use a mean and sd of 0.5 like this (X - 0.5)/ 0.5 to normalize it the the target range. Similar too u can just normalize it directly to range[-1, 1] by using X = (X - 127.5)/127.5.
If u apply this to an image and still try to load it it will give u the same exact visual representation as when it wasn’t normalized so it’s optional to reverse the normalization at output.
Hope this helps you.