提交 a30128b6 编写于 作者: Z ZhidanLiu

fix issues

上级 afa3f75f
...@@ -120,20 +120,18 @@ class Fuzzer: ...@@ -120,20 +120,18 @@ class Fuzzer:
'FGSM': {'params': {'eps': {'dtype': [float, int], 'range': [0, 1]}, 'FGSM': {'params': {'eps': {'dtype': [float, int], 'range': [0, 1]},
'alpha': {'dtype': [float, int], 'alpha': {'dtype': [float, int],
'range': [0, 1]}, 'range': [0, 1]},
'bounds': {'dtype': [list, tuple], 'bounds': {'dtype': [list, tuple]}}},
'range': None}}},
'PGD': {'params': {'eps': {'dtype': [float, int], 'range': [0, 1]}, 'PGD': {'params': {'eps': {'dtype': [float, int], 'range': [0, 1]},
'eps_iter': {'dtype': [float, int], 'eps_iter': {'dtype': [float, int],
'range': [0, 1e5]}, 'range': [0, 1e5]},
'nb_iter': {'dtype': [float, int], 'nb_iter': {'dtype': [float, int],
'range': [0, 1e5]}, 'range': [0, 1e5]},
'bounds': {'dtype': [list, tuple], 'bounds': {'dtype': [list, tuple]}}},
'range': None}}},
'MDIIM': { 'MDIIM': {
'params': {'eps': {'dtype': [float, int], 'range': [0, 1]}, '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]}, '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', def fuzzing(self, mutate_config, initial_seeds, coverage_metric='KMNC',
eval_metrics='auto', max_iters=10000, mutate_num_per_seed=20): eval_metrics='auto', max_iters=10000, mutate_num_per_seed=20):
......
...@@ -579,7 +579,7 @@ class Rotate(ImageTransform): ...@@ -579,7 +579,7 @@ class Rotate(ImageTransform):
""" """
_, chw, normalized, gray3dim, image = self._check(image) _, chw, normalized, gray3dim, image = self._check(image)
img = to_pil(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, trans_image = self._original_format(trans_image, chw, normalized,
gray3dim) gray3dim)
return trans_image return trans_image
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册