Closed LanpingTech closed 11 months ago
Hi @LanpingTech, that is correct. Opacus doesn't support WeightedRandomSampler. The DPDataLoader replaces the sampler with UniformWithReplacementSampler
to enable PoissonSampling. https://opacus.ai/api/data_loader.html
The previously set WeightedRandomSampler in the train_dataloader processed by privacy_engine.make_private is invalid!
You can get the following print:
When uncommented in the above code, it means to use PrivacyEngine.