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

mean and std for every channel is 0.5 instead of (0.5071, 0.4867. 0.4408) as mean  and (0.2657, 0.2565, 0.2761) as std #19

Closed
shashankskagnihotri opened this issue Feb 27, 2021 · 2 comments

Comments

@shashankskagnihotri
Copy link

Hi,
For normalizing cifar100 dataset, you used (0.5, 0.,5 0.,5) for mean and std instead of (0.5071, 0.4867. 0.4408) as mean and (0.2657, 0.2565, 0.2761) as std which is more commonly used. Is this by design? and if so, could you please explain in brief, as to why?

@hendrycks
Copy link
Contributor

This so that converting between [-1,1] (image for a neural network) and [0,1] (image for viewing) is easy. For problems such as adversarial examples, one often needs to convert back and forth frequently. It also does not make much of a difference to performance if one uses (0.5, 0.,5 0.,5) vs (0.5071, 0.4867. 0.4408).

@shashankskagnihotri
Copy link
Author

Thanks. :)

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

2 participants