Could not grasp the reasoning behind using X=X/255 to normalize the dataset. My understanding is that the mnist dataset is gray-scale so value should be between 0-255. In that particular scenario, would not it be better to use modulo operator?
Normalization of MNIST dataset
Hey @tisandas2011, dividing an image by 255 simply rescales the image from 0-255
to 0.0-1.0
. (Converting it to float from int makes computation convenient too)
No modulo operator would return the remainder, whereas we want to just rescale our data by dividing by 255.
I hope you are able to understand !
Happy Learning
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.