pytorch / opacus

Training PyTorch models with differential privacy
https://opacus.ai
Apache License 2.0
1.67k stars 332 forks source link

Missing argument in MNIST example #517

Closed danperazzo closed 1 year ago

danperazzo commented 1 year ago

📚 Documentation

Hello everyone, I have been reading the MNIST_README.md to run its example and I noticed an issue.

It mentions that, to run it, we have to use:

python mnist.py --device=cpu -n=15 --lr=.25 --sigma=1.3 -c=1.5 -sr=0.004

However, there is no argument sr on the code, and the results are too different from the reported ones. Thanks for the attention!

pierrestock commented 1 year ago

Hey danperazzo,

Thanks for flagging this! Labelling is at bug, will investigate.

xuefeng-xu commented 1 year ago

'-sr' means poisson sampling rate, but the code use '-b' batch size, so just change -sr=0.004 to -b=240, for example.

ffuuugor commented 1 year ago

Fixed with #520