提交 1d3a5726 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!49 delete the annotation of the prarameter 'mean'

Merge pull request !49 from ZhidanLiu/master
...@@ -176,7 +176,6 @@ class AdaGaussianRandom(Mechanisms): ...@@ -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): ...@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册