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

!87 modify notations of fuzzing to fix two issues

Merge pull request !87 from ZhidanLiu/master
...@@ -140,17 +140,28 @@ class Fuzzer: ...@@ -140,17 +140,28 @@ class Fuzzer:
Args: Args:
mutate_config (list): Mutate configs. The format is mutate_config (list): Mutate configs. The format is
[{'method': 'Blur', 'params': {'auto_param': True}}, {'method': 'Contrast', 'params': {'factor': 2}}]. [{'method': 'Blur', 'params': {'auto_param': True}},
The supported methods list is in `self._strategies`, and the params of each method must within the {'method': 'Contrast', 'params': {'factor': 2}}].
range of changeable parameters. All supported methods are: 'Contrast', 'Brightness', 'Blur', The supported methods list is in `self._strategies`, and the
'Noise', 'Translate', 'Scale', 'Shear', 'Rotate', 'FGSM', 'PGD' and 'MDIIM'. params of each method must within the range of changeable parameters. 
Supported methods are grouped in three types:
Firstly, pixel value based transform methods include:
'Contrast', 'Brightness', 'Blur' and 'Noise'. Secondly, affine
transform methods include: 'Translate', 'Scale', 'Shear' and
'Rotate'. Thirdly, attack methods include: 'FGSM', 'PGD' and 'MDIIM'.
`mutate_config` must have method in the type of pixel value based
transform methods. The way of setting parameters for first and
second type methods can be seen in 'mindarmour/fuzzing/image_transform.py'.
For third type methods, you can refer to the corresponding class.
initial_seeds (numpy.ndarray): Initial seeds used to generate initial_seeds (numpy.ndarray): Initial seeds used to generate
mutated samples. mutated samples.
coverage_metric (str): Model coverage metric of neural networks. coverage_metric (str): Model coverage metric of neural networks. All
Default: 'KMNC'. supported metrics are: 'KMNC', 'NBC', 'SNAC'. Default: 'KMNC'.
eval_metrics (Union[list, tuple, str]): Evaluation metrics. If the type is 'auto', eval_metrics (Union[list, tuple, str]): Evaluation metrics. If the
it will calculate all the metrics, else if the type is list or tuple, it will type is 'auto', it will calculate all the metrics, else if the
calculate the metrics specified by user. Default: 'auto'. type is list or tuple, it will calculate the metrics specified
by user. All supported evaluate methods are 'accuracy',
'attack_success_rate', 'kmnc', 'nbc', 'snac'. Default: 'auto'.
max_iters (int): Max number of select a seed to mutate. max_iters (int): Max number of select a seed to mutate.
Default: 10000. Default: 10000.
mutate_num_per_seed (int): The number of mutate times for a seed. mutate_num_per_seed (int): The number of mutate times for a seed.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册