opacus icon indicating copy to clipboard operation
opacus copied to clipboard

MNIST example transform

Open astorfi opened this issue 6 years ago • 4 comments

Hi,

In the mnist example, why do you use the following transform and what's the reason behind those numbers:

transforms.Normalize((0.1307,), (0.3081,))

Thank you

astorfi avatar Mar 17 '20 18:03 astorfi

This tracks the MNIST example in PyTorch.

Darktex avatar Mar 18 '20 17:03 Darktex

Sorry if I could not convey what I meant. I understand it tracks that. My question is why 0.1307 and 0.3081? Thank you

astorfi avatar Mar 18 '20 17:03 astorfi

0.1307 and 0.3081 are the global mean and standard deviation of the MNIST dataset. Typically you normalize by the global mean and standard deviation in the transform

JohnlNguyen avatar Mar 19 '20 17:03 JohnlNguyen

Thank you.

astorfi avatar Mar 19 '20 19:03 astorfi