Skip to content
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 do pixel normalization? #115

Open
Chrgo opened this issue Oct 22, 2018 · 3 comments
Open

Why do pixel normalization? #115

Chrgo opened this issue Oct 22, 2018 · 3 comments

Comments

@Chrgo
Copy link

Chrgo commented Oct 22, 2018

A quite simple question, why normalize pixels with (img - 127.5)/128?
I didn't find any useful information. Can anyone help me? Thanks.

@wy1iu
Copy link
Owner

wy1iu commented Feb 22, 2019

It is a standard data processing procedure. I think it is used not only in deep neural nets. Imagine a simple case where you just classify two points in 2D space, if you don't do such normalization, they will just lie in the positive domain, which limits the learning space of the decision boundary and incorporates unnecessary bias.

@johnnysclai
Copy link

I think @Chrgo is asking why (img - 127.5)/128 is used, instead of (img - 127.5)/127.5.

@wy1iu
Copy link
Owner

wy1iu commented Feb 22, 2019

@johnnysclai I don’t think it really matters. As long as your testing and training are consistent, you will be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants