From 5089713e897abfec450240ae59412da4a8ad0f88 Mon Sep 17 00:00:00 2001 From: xumengjuan1 Date: Wed, 13 Jul 2022 18:38:30 +0800 Subject: [PATCH] modify doc --- .jenkins/check/config/filter_linklint.txt | 2 ++ README.md | 4 ++-- README_CN.md | 4 ++-- docs/api/api_python/mindarmour.privacy.diff_privacy.rst | 12 ++++++------ docs/api/api_python/mindarmour.privacy.evaluation.rst | 2 +- docs/api/api_python/mindarmour.privacy.sup_privacy.rst | 8 ++++---- docs/api/api_python/mindarmour.reliability.rst | 6 +++--- docs/api/api_python/mindarmour.rst | 8 ++++---- examples/natural_robustness/ocr_evaluate/cnn_ctc/README.md | 8 ++++---- .../natural_robustness/ocr_evaluate/cnn_ctc/README_CN.md | 10 +++++----- .../ocr_evaluate/对OCR模型CNN-CTC的鲁棒性评测.md | 4 ++-- mindarmour/privacy/diff_privacy/mechanisms/mechanisms.py | 8 ++++++-- mindarmour/privacy/diff_privacy/monitor/monitor.py | 12 +++++++++--- mindarmour/privacy/diff_privacy/train/model.py | 2 +- mindarmour/privacy/evaluation/membership_inference.py | 2 +- mindarmour/privacy/sup_privacy/mask_monitor/masker.py | 2 +- mindarmour/privacy/sup_privacy/sup_ctrl/conctrl.py | 4 ++-- mindarmour/privacy/sup_privacy/train/model.py | 2 +- .../reliability/concept_drift/concept_drift_check_images.py | 2 +- .../concept_drift/concept_drift_check_time_series.py | 2 +- .../reliability/model_fault_injection/fault_injection.py | 2 +- 21 files changed, 59 insertions(+), 47 deletions(-) create mode 100644 .jenkins/check/config/filter_linklint.txt diff --git a/.jenkins/check/config/filter_linklint.txt b/.jenkins/check/config/filter_linklint.txt new file mode 100644 index 0000000..5b358bd --- /dev/null +++ b/.jenkins/check/config/filter_linklint.txt @@ -0,0 +1,2 @@ +https://mindspore.cn/mindarmour/*/r1.8/* +https://www.mindspore.cn/*/r1.8/* \ No newline at end of file diff --git a/README.md b/README.md index 415750a..3f6389a 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ The architecture is shown as follow: - The hardware platform should be Ascend, GPU or CPU. - See our [MindSpore Installation Guide](https://www.mindspore.cn/install) to install MindSpore. The versions of MindArmour and MindSpore must be consistent. -- All other dependencies are included in [setup.py](https://gitee.com/mindspore/mindarmour/blob/master/setup.py). +- All other dependencies are included in [setup.py](https://gitee.com/mindspore/mindarmour/blob/r1.8/setup.py). ### Installation @@ -100,7 +100,7 @@ The architecture is shown as follow: pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/{version}/MindArmour/{arch}/mindarmour-{version}-cp37-cp37m-linux_{arch}.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -> - When the network is connected, dependency items are automatically downloaded during .whl package installation. (For details about other dependency items, see [setup.py](https://gitee.com/mindspore/mindarmour/blob/master/setup.py)). In other cases, you need to manually install dependency items. +> - When the network is connected, dependency items are automatically downloaded during .whl package installation. (For details about other dependency items, see [setup.py](https://gitee.com/mindspore/mindarmour/blob/r1.8/setup.py)). In other cases, you need to manually install dependency items. > - `{version}` denotes the version of MindArmour. For example, when you are downloading MindArmour 1.0.1, `{version}` should be 1.0.1. > - `{arch}` denotes the system architecture. For example, the Linux system you are using is x86 architecture 64-bit, `{arch}` should be `x86_64`. If the system is ARM architecture 64-bit, then it should be `aarch64`. diff --git a/README_CN.md b/README_CN.md index 0c53995..dbb2462 100644 --- a/README_CN.md +++ b/README_CN.md @@ -72,7 +72,7 @@ Fuzz Testing模块的架构图如下: - 硬件平台为Ascend、GPU或CPU。 - 参考[MindSpore安装指南](https://www.mindspore.cn/install),完成MindSpore的安装。 MindArmour与MindSpore的版本需保持一致。 -- 其余依赖请参见[setup.py](https://gitee.com/mindspore/mindarmour/blob/master/setup.py)。 +- 其余依赖请参见[setup.py](https://gitee.com/mindspore/mindarmour/blob/r1.8/setup.py)。 ### 安装 @@ -97,7 +97,7 @@ Fuzz Testing模块的架构图如下: pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/{version}/MindArmour/{arch}/mindarmour-{version}-cp37-cp37m-linux_{arch}.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -> - 在联网状态下,安装whl包时会自动下载MindArmour安装包的依赖项(依赖项详情参见[setup.py](https://gitee.com/mindspore/mindarmour/blob/master/setup.py)),其余情况需自行安装。 +> - 在联网状态下,安装whl包时会自动下载MindArmour安装包的依赖项(依赖项详情参见[setup.py](https://gitee.com/mindspore/mindarmour/blob/r1.8/setup.py)),其余情况需自行安装。 > - `{version}`表示MindArmour版本号,例如下载1.0.1版本MindArmour时,`{version}`应写为1.0.1。 > - `{arch}`表示系统架构,例如使用的Linux系统是x86架构64位时,`{arch}`应写为`x86_64`。如果系统是ARM架构64位,则写为`aarch64`。 diff --git a/docs/api/api_python/mindarmour.privacy.diff_privacy.rst b/docs/api/api_python/mindarmour.privacy.diff_privacy.rst index 7ba6454..0c56ebc 100644 --- a/docs/api/api_python/mindarmour.privacy.diff_privacy.rst +++ b/docs/api/api_python/mindarmour.privacy.diff_privacy.rst @@ -88,7 +88,7 @@ mindarmour.privacy.diff_privacy 噪声产生机制的工厂类。它目前支持高斯随机噪声(Gaussian Random Noise)和自适应高斯随机噪声(Adaptive Gaussian Random Noise)。 - 详情请查看: `教程 `_。 + 详情请查看: `教程 `_。 .. py:method:: create(mech_name, norm_bound=1.0, initial_noise_multiplier=1.0, seed=0, noise_decay_rate=6e-6, decay_policy=None) @@ -113,7 +113,7 @@ mindarmour.privacy.diff_privacy 梯度剪裁机制的工厂类。它目前支持高斯随机噪声(Gaussian Random Noise)的自适应剪裁(Adaptive Clipping)。 - 详情请查看: `教程 `_。 + 详情请查看: `教程 `_。 .. py:method:: create(mech_name, decay_policy='Linear', learning_rate=0.001, target_unclipped_quantile=0.9, fraction_stddev=0.01, seed=0) @@ -138,7 +138,7 @@ mindarmour.privacy.diff_privacy DP训练隐私监视器的工厂类。 - 详情请查看: `教程 `_。 + 详情请查看: `教程 `_。 .. py:method:: create(policy, *args, **kwargs) @@ -163,7 +163,7 @@ mindarmour.privacy.diff_privacy .. math:: (ε'+\frac{log(1/δ)}{α-1}, δ) - 详情请查看: `教程 `_。 + 详情请查看: `教程 `_。 参考文献: `Rényi Differential Privacy of the Sampled Gaussian Mechanism `_。 @@ -207,7 +207,7 @@ mindarmour.privacy.diff_privacy 注意,ZCDPMonitor不适合子采样噪声机制(如NoiseAdaGaussianRandom和NoiseGaussianRandom)。未来将开发zCDP的匹配噪声机制。 - 详情请查看: `教程 `_。 + 详情请查看: `教程 `_。 参考文献:`Concentrated Differentially Private Gradient Descent with Adaptive per-Iteration Privacy Budget `_。 @@ -277,7 +277,7 @@ mindarmour.privacy.diff_privacy 这个类重载自Mindpore.train.model.Model。 - 详情请查看: `教程 `_。 + 详情请查看: `教程 `_。 **参数:** diff --git a/docs/api/api_python/mindarmour.privacy.evaluation.rst b/docs/api/api_python/mindarmour.privacy.evaluation.rst index 554591f..977d15f 100644 --- a/docs/api/api_python/mindarmour.privacy.evaluation.rst +++ b/docs/api/api_python/mindarmour.privacy.evaluation.rst @@ -8,7 +8,7 @@ mindarmour.privacy.evaluation 成员推理是由Shokri、Stronati、Song和Shmatikov提出的一种用于推断用户隐私数据的灰盒攻击。它需要训练样本的loss或logits结果。 (隐私是指单个用户的一些敏感属性)。 - 有关详细信息,请参见: `教程 `_。 + 有关详细信息,请参见: `教程 `_。 参考文献:`Reza Shokri, Marco Stronati, Congzheng Song, Vitaly Shmatikov. Membership Inference Attacks against Machine Learning Models. 2017. `_。 diff --git a/docs/api/api_python/mindarmour.privacy.sup_privacy.rst b/docs/api/api_python/mindarmour.privacy.sup_privacy.rst index 23e32d6..9a04c69 100644 --- a/docs/api/api_python/mindarmour.privacy.sup_privacy.rst +++ b/docs/api/api_python/mindarmour.privacy.sup_privacy.rst @@ -8,7 +8,7 @@ mindarmour.privacy.sup_privacy 周期性检查抑制隐私功能状态和切换(启动/关闭)抑制操作。 详情请查看: `应用抑制隐私机制保护用户隐私 - `_。 + `_。 **参数:** @@ -27,7 +27,7 @@ mindarmour.privacy.sup_privacy 完整的模型训练功能。抑制隐私函数嵌入到重载的mindspore.train.model.Model中。 - 有关详细信息,请查看: `应用抑制隐私机制保护用户隐私 `_。 + 有关详细信息,请查看: `应用抑制隐私机制保护用户隐私 `_。 **参数:** @@ -48,7 +48,7 @@ mindarmour.privacy.sup_privacy SuppressCtrl机制的工厂类。 - 详情请查看: `应用抑制隐私机制保护用户隐私 `_。 + 详情请查看: `应用抑制隐私机制保护用户隐私 `_。 .. py:method:: create(networks, mask_layers, policy='local_train', end_epoch=10, batch_num=20, start_epoch=3, mask_times=1000, lr=0.05, sparse_end=0.90, sparse_start=0.0) @@ -73,7 +73,7 @@ mindarmour.privacy.sup_privacy 完成抑制隐私操作,包括计算抑制比例,找到应该抑制的参数,并永久抑制这些参数。 - 详情请查看: `应用抑制隐私机制保护用户隐私 `_。 + 详情请查看: `应用抑制隐私机制保护用户隐私 `_。 **参数:** diff --git a/docs/api/api_python/mindarmour.reliability.rst b/docs/api/api_python/mindarmour.reliability.rst index 4a22a7e..382a8dc 100644 --- a/docs/api/api_python/mindarmour.reliability.rst +++ b/docs/api/api_python/mindarmour.reliability.rst @@ -7,7 +7,7 @@ MindArmour的可靠性方法。 故障注入模块模拟深度神经网络的各种故障场景,并评估模型的性能和可靠性。 - 详情请查看 `实现模型故障注入评估模型容错性 `_。 + 详情请查看 `实现模型故障注入评估模型容错性 `_。 **参数:** @@ -42,7 +42,7 @@ MindArmour的可靠性方法。 概念漂移检查时间序列(ConceptDriftCheckTimeSeries)用于样本序列分布变化检测。 有关详细信息,请查看 `实现时序数据概念漂移检测应用 - `_。 + `_。 **参数:** @@ -107,7 +107,7 @@ MindArmour的可靠性方法。 训练OOD检测器。提取训练数据特征,得到聚类中心。测试数据特征与聚类中心之间的距离确定图像是否为分布外(OOD)图像。 - 有关详细信息,请查看 `实现图像数据概念漂移检测应用 `_。 + 有关详细信息,请查看 `实现图像数据概念漂移检测应用 `_。 **参数:** diff --git a/docs/api/api_python/mindarmour.rst b/docs/api/api_python/mindarmour.rst index f6c7438..f72f24a 100644 --- a/docs/api/api_python/mindarmour.rst +++ b/docs/api/api_python/mindarmour.rst @@ -196,7 +196,7 @@ MindArmour是MindSpore的工具箱,用于增强模型可信,实现隐私保 - 首先,自然鲁棒性方法包括:'Translate', 'Scale'、'Shear'、'Rotate'、'Perspective'、'Curve'、'GaussianBlur'、'MotionBlur'、'GradientBlur'、'Contrast'、'GradientLuminance'、'UniformNoise'、'GaussianNoise'、'SaltAndPepperNoise'、'NaturalNoise'。 - 其次,对抗样本攻击方式包括:'FGSM'、'PGD'和'MDIM'。'FGSM'、'PGD'和'MDIM'分别是 FastGradientSignMethod、ProjectedGradientDent和MomentumDiverseInputIterativeMethod的缩写。 `mutate_config` 必须包含在['Contrast', 'GradientLuminance', 'GaussianBlur', 'MotionBlur', 'GradientBlur', 'UniformNoise', 'GaussianNoise', 'SaltAndPepperNoise', 'NaturalNoise']中的方法。 - - 第一类方法的参数设置方式可以在 `mindarmour/natural_robustness/transform/image `_ 中看到。第二类方法参数配置参考 `self._attack_param_checklists` 。 + - 第一类方法的参数设置方式可以在 `mindarmour/natural_robustness/transform/image `_ 中看到。第二类方法参数配置参考 `self._attack_param_checklists` 。 - **initial_seeds** (list[list]) - 用于生成变异样本的初始种子队列。初始种子队列的格式为[[image_data, label], [...], ...],且标签必须为one-hot。 - **coverage** (CoverageMetrics) - 神经元覆盖率指标类。 - **evaluate** (bool) - 是否返回评估报告。默认值:True。 @@ -223,7 +223,7 @@ MindArmour是MindSpore的工具箱,用于增强模型可信,实现隐私保 这个类就是重载Mindpore.train.model.Model。 - 详情请查看: `应用差分隐私机制保护用户隐私 `_。 + 详情请查看: `应用差分隐私机制保护用户隐私 `_。 **参数:** @@ -241,7 +241,7 @@ MindArmour是MindSpore的工具箱,用于增强模型可信,实现隐私保 成员推理是由Shokri、Stronati、Song和Shmatikov提出的一种用于推测用户隐私数据的灰盒攻击。它需要训练样本的loss或logits结果。(隐私是指单个用户的一些敏感属性)。 - 有关详细信息,请参见:`使用成员推理测试模型安全性 `_。 + 有关详细信息,请参见:`使用成员推理测试模型安全性 `_。 参考文献:`Reza Shokri, Marco Stronati, Congzheng Song, Vitaly Shmatikov. Membership Inference Attacks against Machine Learning Models. 2017. `_。 @@ -357,7 +357,7 @@ MindArmour是MindSpore的工具箱,用于增强模型可信,实现隐私保 概念漂移检查时间序列(ConceptDriftCheckTimeSeries)用于样本序列分布变化检测。 - 有关详细信息,请查看: `实现时序数据概念漂移检测应用 `_。 + 有关详细信息,请查看: `实现时序数据概念漂移检测应用 `_。 **参数:** diff --git a/examples/natural_robustness/ocr_evaluate/cnn_ctc/README.md b/examples/natural_robustness/ocr_evaluate/cnn_ctc/README.md index f6eb5f6..001322b 100644 --- a/examples/natural_robustness/ocr_evaluate/cnn_ctc/README.md +++ b/examples/natural_robustness/ocr_evaluate/cnn_ctc/README.md @@ -94,7 +94,7 @@ This takes around 75 minutes. ## Mixed Precision -The [mixed precision](https://www.mindspore.cn/tutorials/experts/en/master/others/mixed_precision.html) training method accelerates the deep learning neural network training process by using both the single-precision and half-precision data formats, and maintains the network precision achieved by the single-precision training at the same time. Mixed precision training can accelerate the computation process, reduce memory usage, and enable a larger model or batch size to be trained on specific hardware. +The [mixed precision](https://www.mindspore.cn/tutorials/experts/en/r1.8/others/mixed_precision.html) training method accelerates the deep learning neural network training process by using both the single-precision and half-precision data formats, and maintains the network precision achieved by the single-precision training at the same time. Mixed precision training can accelerate the computation process, reduce memory usage, and enable a larger model or batch size to be trained on specific hardware. For FP16 operators, if the input data type is FP32, the backend of MindSpore will automatically handle it with reduced precision. Users could check the reduced-precision operators by enabling INFO log and then searching ‘reduce precision’. # [Environment Requirements](#contents) @@ -106,9 +106,9 @@ For FP16 operators, if the input data type is FP32, the backend of MindSpore wil - [MindSpore](https://www.mindspore.cn/install/en) - For more information, please check the resources below: - - [MindSpore tutorials](https://www.mindspore.cn/tutorials/en/master/index.html) + - [MindSpore tutorials](https://www.mindspore.cn/tutorials/en/r1.8/index.html) - - [MindSpore Python API](https://www.mindspore.cn/docs/en/master/index.html) + - [MindSpore Python API](https://www.mindspore.cn/docs/en/r1.8/index.html) # [Quick Start](#contents) @@ -517,7 +517,7 @@ accuracy: 0.8533 ### Inference -If you need to use the trained model to perform inference on multiple hardware platforms, such as GPU, Ascend 910 or Ascend 310, you can refer to this [Link](https://www.mindspore.cn/tutorials/experts/en/master/infer/inference.html). Following the steps below, this is a simple example: +If you need to use the trained model to perform inference on multiple hardware platforms, such as GPU, Ascend 910 or Ascend 310, you can refer to this [Link](https://www.mindspore.cn/tutorials/experts/en/r1.8/infer/inference.html). Following the steps below, this is a simple example: - Running on Ascend diff --git a/examples/natural_robustness/ocr_evaluate/cnn_ctc/README_CN.md b/examples/natural_robustness/ocr_evaluate/cnn_ctc/README_CN.md index 4a03226..6791bfc 100644 --- a/examples/natural_robustness/ocr_evaluate/cnn_ctc/README_CN.md +++ b/examples/natural_robustness/ocr_evaluate/cnn_ctc/README_CN.md @@ -95,7 +95,7 @@ python src/preprocess_dataset.py ## 混合精度 -采用[混合精度](https://www.mindspore.cn/tutorials/experts/zh-CN/master/others/mixed_precision.html)的训练方法使用支持单精度和半精度数据来提高深度学习神经网络的训练速度,同时保持单精度训练所能达到的网络精度。混合精度训练提高计算速度、减少内存使用的同时,支持在特定硬件上训练更大的模型或实现更大批次的训练。 +采用[混合精度](https://www.mindspore.cn/tutorials/experts/zh-CN/r1.8/others/mixed_precision.html)的训练方法使用支持单精度和半精度数据来提高深度学习神经网络的训练速度,同时保持单精度训练所能达到的网络精度。混合精度训练提高计算速度、减少内存使用的同时,支持在特定硬件上训练更大的模型或实现更大批次的训练。 以FP16算子为例,如果输入数据类型为FP32,MindSpore后台会自动降低精度来处理数据。用户可打开INFO日志,搜索“reduce precision”查看精度降低的算子。 # 环境要求 @@ -109,9 +109,9 @@ python src/preprocess_dataset.py - [MindSpore](https://www.mindspore.cn/install) - 如需查看详情,请参见如下资源: - - [MindSpore教程](https://www.mindspore.cn/tutorials/zh-CN/master/index.html) + - [MindSpore教程](https://www.mindspore.cn/tutorials/zh-CN/r1.8/index.html) - - [MindSpore Python API](https://www.mindspore.cn/docs/zh-CN/master/index.html) + - [MindSpore Python API](https://www.mindspore.cn/docs/zh-CN/r1.8/index.html) # 快速入门 @@ -250,7 +250,7 @@ bash scripts/run_distribute_train_ascend.sh [RANK_TABLE_FILE] [PRETRAINED_CKPT(o > 注意: - RANK_TABLE_FILE相关参考资料见[链接](https://www.mindspore.cn/tutorials/experts/zh-CN/master/parallel/train_ascend.html), 获取device_ip方法详见[链接](https://gitee.com/mindspore/models/tree/master/utils/hccl_tools). + RANK_TABLE_FILE相关参考资料见[链接](https://www.mindspore.cn/tutorials/experts/zh-CN/r1.8/parallel/train_ascend.html), 获取device_ip方法详见[链接](https://gitee.com/mindspore/models/tree/master/utils/hccl_tools). ### 训练结果 @@ -449,7 +449,7 @@ bash run_infer_310.sh [MINDIR_PATH] [DATA_PATH] [DVPP] [DEVICE_ID] ### 推理 -如果您需要在GPU、Ascend 910、Ascend 310等多个硬件平台上使用训练好的模型进行推理,请参考此[链接](https://www.mindspore.cn/tutorials/experts/zh-CN/master/infer/inference.html)。以下为简单示例: +如果您需要在GPU、Ascend 910、Ascend 310等多个硬件平台上使用训练好的模型进行推理,请参考此[链接](https://www.mindspore.cn/tutorials/experts/zh-CN/r1.8/infer/inference.html)。以下为简单示例: - Ascend处理器环境运行 diff --git a/examples/natural_robustness/ocr_evaluate/对OCR模型CNN-CTC的鲁棒性评测.md b/examples/natural_robustness/ocr_evaluate/对OCR模型CNN-CTC的鲁棒性评测.md index dbd1f26..00d0a20 100644 --- a/examples/natural_robustness/ocr_evaluate/对OCR模型CNN-CTC的鲁棒性评测.md +++ b/examples/natural_robustness/ocr_evaluate/对OCR模型CNN-CTC的鲁棒性评测.md @@ -126,7 +126,7 @@ ### 基于自然扰动serving生成评测数据集 -1. 启动自然扰动serving服务。具体说明参考:[ 自然扰动样本生成serving服务](https://gitee.com/mindspore/mindarmour/blob/master/examples/natural_robustness/serving/README.md) +1. 启动自然扰动serving服务。具体说明参考:[ 自然扰动样本生成serving服务](https://gitee.com/mindspore/mindarmour/blob/r1.8/examples/natural_robustness/serving/README.md) ```bash cd serving/server/ @@ -144,7 +144,7 @@ 2. 核心代码说明: - 1. 配置扰动方法,目前可选的扰动方法及参数配置参考[image transform methods](https://gitee.com/mindspore/mindarmour/tree/master/mindarmour/natural_robustness/transform/image)。下面是一个配置例子。 + 1. 配置扰动方法,目前可选的扰动方法及参数配置参考[image transform methods](https://gitee.com/mindspore/mindarmour/tree/r1.8/mindarmour/natural_robustness/transform/image)。下面是一个配置例子。 ```python PerturbConfig = [ diff --git a/mindarmour/privacy/diff_privacy/mechanisms/mechanisms.py b/mindarmour/privacy/diff_privacy/mechanisms/mechanisms.py index c353386..1d17a2f 100644 --- a/mindarmour/privacy/diff_privacy/mechanisms/mechanisms.py +++ b/mindarmour/privacy/diff_privacy/mechanisms/mechanisms.py @@ -39,7 +39,9 @@ class ClipMechanismsFactory: Wrapper of clip noise generating mechanisms. It supports Adaptive Clipping with Gaussian Random Noise for now. - For details, please check `Tutorial `_. + For details, please check `Tutorial + `_. """ @@ -100,7 +102,9 @@ class NoiseMechanismsFactory: Wrapper of noise generating mechanisms. It supports Gaussian Random Noise and Adaptive Gaussian Random Noise for now. - For details, please check `Tutorial `_. + For details, please check `Tutorial + `_. """ def __init__(self): diff --git a/mindarmour/privacy/diff_privacy/monitor/monitor.py b/mindarmour/privacy/diff_privacy/monitor/monitor.py index 8303295..c22d1a4 100644 --- a/mindarmour/privacy/diff_privacy/monitor/monitor.py +++ b/mindarmour/privacy/diff_privacy/monitor/monitor.py @@ -28,7 +28,9 @@ TAG = 'DP monitor' class PrivacyMonitorFactory: """ Factory class of DP training's privacy monitor. - For details, please check `Tutorial `_. + For details, please check `Tutorial + `_. """ @@ -77,7 +79,9 @@ class RDPMonitor(Callback): .. math:: (ε'+\frac{log(1/δ)}{α-1}, δ) - For details, please check `Tutorial `_. + For details, please check `Tutorial + `_. Reference: `Rényi Differential Privacy of the Sampled Gaussian Mechanism `_ @@ -370,7 +374,9 @@ class ZCDPMonitor(Callback): noise mechanisms(such as NoiseAdaGaussianRandom and NoiseGaussianRandom). The matching noise mechanism of ZCDP will be developed in the future. - For details, please check `Tutorial `_. + For details, please check `Tutorial + `_. Reference: `Concentrated Differentially Private Gradient Descent with Adaptive per-Iteration Privacy Budget `_ diff --git a/mindarmour/privacy/diff_privacy/train/model.py b/mindarmour/privacy/diff_privacy/train/model.py index a3feec7..5bdb7c5 100644 --- a/mindarmour/privacy/diff_privacy/train/model.py +++ b/mindarmour/privacy/diff_privacy/train/model.py @@ -71,7 +71,7 @@ class DPModel(Model): This class is overload mindspore.train.model.Model. For details, please check `Protecting User Privacy with Differential Privacy Mechanism - `_. + `_. Args: micro_batches (int): The number of small batches split from an original diff --git a/mindarmour/privacy/evaluation/membership_inference.py b/mindarmour/privacy/evaluation/membership_inference.py index 9cd37a4..b268c95 100644 --- a/mindarmour/privacy/evaluation/membership_inference.py +++ b/mindarmour/privacy/evaluation/membership_inference.py @@ -99,7 +99,7 @@ class MembershipInference: (Privacy refers to some sensitive attributes of a single user). For details, please refer to the `Using Membership Inference to Test Model Security - `_. + `_. References: `Reza Shokri, Marco Stronati, Congzheng Song, Vitaly Shmatikov. Membership Inference Attacks against Machine Learning Models. 2017. diff --git a/mindarmour/privacy/sup_privacy/mask_monitor/masker.py b/mindarmour/privacy/sup_privacy/mask_monitor/masker.py index 85f1f4a..cbd6972 100644 --- a/mindarmour/privacy/sup_privacy/mask_monitor/masker.py +++ b/mindarmour/privacy/sup_privacy/mask_monitor/masker.py @@ -28,7 +28,7 @@ class SuppressMasker(Callback): """ Periodicity check suppress privacy function status and toggle suppress operation. For details, please check `Protecting User Privacy with Suppression Privacy - `_. + `_. Args: model (SuppressModel): SuppressModel instance. diff --git a/mindarmour/privacy/sup_privacy/sup_ctrl/conctrl.py b/mindarmour/privacy/sup_privacy/sup_ctrl/conctrl.py index 684b507..97ffe0b 100644 --- a/mindarmour/privacy/sup_privacy/sup_ctrl/conctrl.py +++ b/mindarmour/privacy/sup_privacy/sup_ctrl/conctrl.py @@ -36,7 +36,7 @@ class SuppressPrivacyFactory: Factory class of SuppressCtrl mechanisms. For details, please check `Protecting User Privacy with Suppress Privacy - `_. + `_. """ def __init__(self): @@ -120,7 +120,7 @@ class SuppressCtrl(Cell): parameters permanently. For details, please check `Protecting User Privacy with Suppress Privacy - `_. + `_. Args: networks (Cell): The training network. diff --git a/mindarmour/privacy/sup_privacy/train/model.py b/mindarmour/privacy/sup_privacy/train/model.py index 01e8a9a..15a401d 100644 --- a/mindarmour/privacy/sup_privacy/train/model.py +++ b/mindarmour/privacy/sup_privacy/train/model.py @@ -60,7 +60,7 @@ class SuppressModel(Model): mindspore.train.model.Model. For details, please check `Protecting User Privacy with Suppress Privacy - `_. + `_. Args: network (Cell): The training network. diff --git a/mindarmour/reliability/concept_drift/concept_drift_check_images.py b/mindarmour/reliability/concept_drift/concept_drift_check_images.py index 36fabd8..a98de04 100644 --- a/mindarmour/reliability/concept_drift/concept_drift_check_images.py +++ b/mindarmour/reliability/concept_drift/concept_drift_check_images.py @@ -90,7 +90,7 @@ class OodDetectorFeatureCluster(OodDetector): image or not. For details, please check `Implementing the Concept Drift Detection Application of Image Data - `_. + `_. Args: model (Model):The training model. diff --git a/mindarmour/reliability/concept_drift/concept_drift_check_time_series.py b/mindarmour/reliability/concept_drift/concept_drift_check_time_series.py index 2e10d55..608a2c4 100644 --- a/mindarmour/reliability/concept_drift/concept_drift_check_time_series.py +++ b/mindarmour/reliability/concept_drift/concept_drift_check_time_series.py @@ -24,7 +24,7 @@ class ConceptDriftCheckTimeSeries: r""" ConceptDriftCheckTimeSeries is used for example series distribution change detection. For details, please check `Implementing the Concept Drift Detection Application of Time Series Data - `_. + `_. Args: window_size(int): Size of a concept window, no less than 10. If given the input data, diff --git a/mindarmour/reliability/model_fault_injection/fault_injection.py b/mindarmour/reliability/model_fault_injection/fault_injection.py index 380885a..ad4cd31 100644 --- a/mindarmour/reliability/model_fault_injection/fault_injection.py +++ b/mindarmour/reliability/model_fault_injection/fault_injection.py @@ -32,7 +32,7 @@ class FaultInjector: performance and reliability of the model. For details, please check `Implementing the Model Fault Injection and Evaluation - `_. + `_. Args: model (Model): The model need to be evaluated.