-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why we have to rescale by 1. / 255 #1
Comments
Hi @anhlt! Talking about preprocess_input function, I don't know on which step it can/should be used. I've tried to train model with extracting those mean values and converting to BGR, but then model does not train at all and stack on a very low accuracy (near 0.0387 for each epoch). Then I've tried it on prediction step - results still bad. Also I've noticed that this function is not used inside of Keras. About mean value here's interesting info - Lasagne/Recipes#20 |
@Arsey thank for your answer. Interestingly , I found some preprocess_input implement by @karpathy on his neural-talk repository.
As you can see, He wrote that
I don't think, high value of input can effect learning curve. But I will try both of them and compare the results. |
@Arsey How accurary you get on validation set? I just got only about 80% . |
@anhlt I have about 81% accuracy after 250th epoch on fine tuning step. I see that you also have GTX 1070, just like me))). BTW which OS do you use? |
rescale is a value by which we will multiply the data before any other processing. Our original images consist in RGB coefficients in the 0-255, but such values would be too high for our models to process (given a typical learning rate), so we target values between 0 and 1 instead by scaling with a 1./255 factor. |
I saw this process in Keras blog, and your implementation. But I don't understand why?
this is preprocess step on imagenet_util.py, It just minus the mean value of each dimension.
The text was updated successfully, but these errors were encountered: