diff --git a/mindarmour/fuzzing/fuzzing.py b/mindarmour/fuzzing/fuzzing.py index 36fa162287562d99d73f32d016349f2dcd8d20bd..3b8bcfc612f2879a620c3a155177267f9bbee0ec 100644 --- a/mindarmour/fuzzing/fuzzing.py +++ b/mindarmour/fuzzing/fuzzing.py @@ -120,20 +120,18 @@ class Fuzzer: 'FGSM': {'params': {'eps': {'dtype': [float, int], 'range': [0, 1]}, 'alpha': {'dtype': [float, int], 'range': [0, 1]}, - 'bounds': {'dtype': [list, tuple], - 'range': None}}}, + 'bounds': {'dtype': [list, tuple]}}}, 'PGD': {'params': {'eps': {'dtype': [float, int], 'range': [0, 1]}, 'eps_iter': {'dtype': [float, int], 'range': [0, 1e5]}, 'nb_iter': {'dtype': [float, int], 'range': [0, 1e5]}, - 'bounds': {'dtype': [list, tuple], - 'range': None}}}, + 'bounds': {'dtype': [list, tuple]}}}, 'MDIIM': { 'params': {'eps': {'dtype': [float, int], 'range': [0, 1]}, - 'norm_level': {'dtype': [str], 'range': None}, + 'norm_level': {'dtype': [str]}, 'prob': {'dtype': [float, int], 'range': [0, 1]}, - 'bounds': {'dtype': [list, tuple], 'range': None}}}} + 'bounds': {'dtype': [list, tuple]}}}} def fuzzing(self, mutate_config, initial_seeds, coverage_metric='KMNC', eval_metrics='auto', max_iters=10000, mutate_num_per_seed=20): diff --git a/mindarmour/fuzzing/image_transform.py b/mindarmour/fuzzing/image_transform.py index 44e5a6f41f0d23dc7093678d07d98bef56f29224..77ff6d01c0faa95a3046ae540bbf621e5dbdff85 100644 --- a/mindarmour/fuzzing/image_transform.py +++ b/mindarmour/fuzzing/image_transform.py @@ -579,7 +579,7 @@ class Rotate(ImageTransform): """ _, chw, normalized, gray3dim, image = self._check(image) img = to_pil(image) - trans_image = img.rotate(self.angle, expand=True) + trans_image = img.rotate(self.angle, expand=False) trans_image = self._original_format(trans_image, chw, normalized, gray3dim) return trans_image