What is the sampling rate of the image classifier with DP in the tutorial examples?

Hi, I am running the tutorial example: opacus/building_image_classifier.ipynb at main · pytorch/opacus · GitHub. I noticed that for the privacy engine we don’t need to specify the sampling rate since it is computed by batch size automatically. So my question is how does batch size decide the sampling rate?

I came across this post The Opacus example, train batch size vs sampling rate - #3 by ashkan_software, where it seems like sampling rate = batch size / len(dataset). But when I check the UniformWithReplacementSampler opacus/uniform_sampler.py at main · pytorch/opacus · GitHub, it seems like sampling rate = 1 / batch size there. I am a newbie in this area so please correct me if I am wrong.

After carefully reviewing I think in both places sampling rate = batch size / len(dataset).