pytorch / opacus

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

Add an FAQ about variable batch size #514

Open karthikprasad opened 1 year ago

karthikprasad commented 1 year ago

📚 Documentation

Poisson sampling in DP DataLoader results variable batch sizes. This has been a source of confusion for many and has resulted in at least two questions on the forum (https://discuss.pytorch.org/t/arbitrary-batch-sizes-after-passing-dataloader-through-privacy-engine/161632 and https://discuss.pytorch.org/t/the-samping-of-rdp/158322)

While this has been documented in the docstrings of DPDataLoader (at https://opacus.ai/api/data_loader.html), this is not easily accessible. It might be worth adding this into Opacus FAQ (at https://opacus.ai/docs/faq)