Browse Source

!49 delete the annotation of the prarameter 'mean'

Merge pull request !49 from ZhidanLiu/master
tags/v0.6.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
1d3a57263e
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      mindarmour/diff_privacy/mechanisms/mechanisms.py

+ 1
- 3
mindarmour/diff_privacy/mechanisms/mechanisms.py View File

@@ -176,7 +176,6 @@ class AdaGaussianRandom(Mechanisms):
initial_noise_multiplier(float): Ratio of the standard deviation of initial_noise_multiplier(float): Ratio of the standard deviation of
Gaussian noise divided by the norm_bound, which will be used to Gaussian noise divided by the norm_bound, which will be used to
calculate privacy spent. Default: 1.5. 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. noise_decay_rate(float): Hyper parameter for controlling the noise decay.
Default: 6e-4. Default: 6e-4.
decay_policy(str): Noise decay strategy include 'Step' and 'Time'. 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) >>> gradients = Tensor([0.2, 0.9], mstype.float32)
>>> norm_bound = 1.0 >>> norm_bound = 1.0
>>> initial_noise_multiplier = 1.5 >>> initial_noise_multiplier = 1.5
>>> mean = 0.0
>>> noise_decay_rate = 6e-4 >>> noise_decay_rate = 6e-4
>>> decay_policy = "Time" >>> decay_policy = "Time"
>>> net = AdaGaussianRandom(norm_bound, initial_noise_multiplier, mean
>>> net = AdaGaussianRandom(norm_bound, initial_noise_multiplier,
>>> noise_decay_rate, decay_policy) >>> noise_decay_rate, decay_policy)
>>> res = net(gradients) >>> res = net(gradients)
>>> print(res) >>> print(res)


Loading…
Cancel
Save