diff --git a/mindarmour/adv_robustness/evaluations/attack_evaluation.py b/mindarmour/adv_robustness/evaluations/attack_evaluation.py index c327510..48e3914 100644 --- a/mindarmour/adv_robustness/evaluations/attack_evaluation.py +++ b/mindarmour/adv_robustness/evaluations/attack_evaluation.py @@ -136,10 +136,10 @@ class AttackEvaluate: - float, return average l0, l2, or linf distance of all success adversarial examples, return value includes following cases. - - If return value :math:`>=` 0, average lp distance. The lower, - the more successful the attack is. + - If return value :math:`>=` 0, average lp distance. The lower, + the more successful the attack is. - - If return value is -1, there is no success adversarial examples. + - If return value is -1, there is no success adversarial examples. """ idxes = self._success_idxes success_num = idxes.shape[0] @@ -164,10 +164,10 @@ class AttackEvaluate: Returns: - float, average structural similarity. - - If return value ranges between (0, 1), the higher, the more - successful the attack is. + - If return value ranges between (0, 1), the higher, the more + successful the attack is. - - If return value is -1: there is no success adversarial examples. + - If return value is -1: there is no success adversarial examples. """ success_num = self._success_idxes.shape[0] if success_num == 0: diff --git a/mindarmour/privacy/diff_privacy/mechanisms/mechanisms.py b/mindarmour/privacy/diff_privacy/mechanisms/mechanisms.py index 9419c87..c3a9e8e 100644 --- a/mindarmour/privacy/diff_privacy/mechanisms/mechanisms.py +++ b/mindarmour/privacy/diff_privacy/mechanisms/mechanisms.py @@ -183,8 +183,8 @@ class NoiseGaussianRandom(_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.0. - seed(int): Original random seed, if seed=0 random normal will use secure - random number. IF seed!=0 random normal will generate values using + seed(int): Original random seed, if seed=0, random normal will use secure + random number. If seed!=0, random normal will generate values using given seed. Default: 0. decay_policy(str): Mechanisms parameters update policy. Default: None. diff --git a/mindarmour/privacy/evaluation/membership_inference.py b/mindarmour/privacy/evaluation/membership_inference.py index 4e5d00d..df9e492 100644 --- a/mindarmour/privacy/evaluation/membership_inference.py +++ b/mindarmour/privacy/evaluation/membership_inference.py @@ -95,7 +95,7 @@ def _softmax_cross_entropy(logits, labels): class MembershipInference: """ Evaluation proposed by Shokri, Stronati, Song and Shmatikov is a grey-box attack. - The attack requires obtain loss or logits results of training samples. + The attack requires loss or logits results of training samples. References: `Reza Shokri, Marco Stronati, Congzheng Song, Vitaly Shmatikov. Membership Inference Attacks against Machine Learning Models. 2017.