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

!80 Fix an API issue.

Merge pull request !80 from jxlang910/master
...@@ -27,6 +27,8 @@ from mindarmour.utils.logger import LogUtil ...@@ -27,6 +27,8 @@ from mindarmour.utils.logger import LogUtil
sys.path.append("..") sys.path.append("..")
from data_processing import generate_mnist_dataset from data_processing import generate_mnist_dataset
LOGGER = LogUtil.get_instance() LOGGER = LogUtil.get_instance()
LOGGER.set_level('INFO')
TAG = "Lenet5_train" TAG = "Lenet5_train"
......
...@@ -7,6 +7,8 @@ from .mechanisms.mechanisms import AdaClippingWithGaussianRandom ...@@ -7,6 +7,8 @@ from .mechanisms.mechanisms import AdaClippingWithGaussianRandom
from .mechanisms.mechanisms import NoiseMechanismsFactory from .mechanisms.mechanisms import NoiseMechanismsFactory
from .mechanisms.mechanisms import ClipMechanismsFactory from .mechanisms.mechanisms import ClipMechanismsFactory
from .monitor.monitor import PrivacyMonitorFactory from .monitor.monitor import PrivacyMonitorFactory
from .monitor.monitor import RDPMonitor
from .monitor.monitor import ZCDPMonitor
from .optimizer.optimizer import DPOptimizerClassFactory from .optimizer.optimizer import DPOptimizerClassFactory
from .train.model import DPModel from .train.model import DPModel
...@@ -16,5 +18,7 @@ __all__ = ['NoiseGaussianRandom', ...@@ -16,5 +18,7 @@ __all__ = ['NoiseGaussianRandom',
'NoiseMechanismsFactory', 'NoiseMechanismsFactory',
'ClipMechanismsFactory', 'ClipMechanismsFactory',
'PrivacyMonitorFactory', 'PrivacyMonitorFactory',
'RDPMonitor',
'ZCDPMonitor',
'DPOptimizerClassFactory', 'DPOptimizerClassFactory',
'DPModel'] 'DPModel']
...@@ -40,7 +40,12 @@ class PrivacyMonitorFactory: ...@@ -40,7 +40,12 @@ class PrivacyMonitorFactory:
Args: Args:
policy (str): Monitor policy, 'rdp' and 'zcdp' are supported policy (str): Monitor policy, 'rdp' and 'zcdp' are supported
by now. by now. If policy is 'rdp', the monitor will compute the
privacy budget of DP training based on Renyi differential
privacy theory; If policy is 'zcdp', the monitor will compute
the privacy budget of DP training based on zero-concentrated
differential privacy theory. It's worth noting that 'zcdp'
is not suitable for subsampling nosie mechanism.
args (Union[int, float, numpy.ndarray, list, str]): Parameters args (Union[int, float, numpy.ndarray, list, str]): Parameters
used for creating a privacy monitor. used for creating a privacy monitor.
kwargs (Union[int, float, numpy.ndarray, list, str]): Keyword kwargs (Union[int, float, numpy.ndarray, list, str]): Keyword
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册