diff --git a/mindarmour/diff_privacy/mechanisms/mechanisms.py b/mindarmour/diff_privacy/mechanisms/mechanisms.py index b7a6cd1a8d5ae0113f6c74427b9d0a31c536bb01..3d18e1c2659bcb8b5f078ccbd05df00483b1cb60 100644 --- a/mindarmour/diff_privacy/mechanisms/mechanisms.py +++ b/mindarmour/diff_privacy/mechanisms/mechanisms.py @@ -176,7 +176,6 @@ class AdaGaussianRandom(Mechanisms): initial_noise_multiplier(float): Ratio of the standard deviation of Gaussian noise divided by the norm_bound, which will be used to calculate privacy spent. Default: 1.5. - mean(float): Average value of random noise. Default: 0.0 noise_decay_rate(float): Hyper parameter for controlling the noise decay. Default: 6e-4. decay_policy(str): Noise decay strategy include 'Step' and 'Time'. @@ -190,10 +189,9 @@ class AdaGaussianRandom(Mechanisms): >>> gradients = Tensor([0.2, 0.9], mstype.float32) >>> norm_bound = 1.0 >>> initial_noise_multiplier = 1.5 - >>> mean = 0.0 >>> noise_decay_rate = 6e-4 >>> decay_policy = "Time" - >>> net = AdaGaussianRandom(norm_bound, initial_noise_multiplier, mean + >>> net = AdaGaussianRandom(norm_bound, initial_noise_multiplier, >>> noise_decay_rate, decay_policy) >>> res = net(gradients) >>> print(res)