machrisaa / tensorflow-vgg

VGG19 and VGG16 on Tensorflow
2.21k stars 1.08k forks source link

why we devide image by 255.0? #47

Closed chunhui204 closed 6 years ago

deng-wei commented 6 years ago

Take a look at vgg19.py~

chunhui204 commented 6 years ago

I know the image multiplied by 255.0, but i dont know meaning of deviding image and then multipling it,thanks so much

chunhui204 commented 6 years ago

I know, its data normalization! Forgive my stupid please...

alexwongdl commented 6 years ago

I have the same question, img = img / 255.0 and then rgb_scaled = rgb * 255.0, does not do any normalization between them.