32a9e66e0e45b1a6119fcb0e1ed5f74c0d5dab15,art/attacks/evasion/simba_pixel.py,SimBA_pixel,generate,#SimBA_pixel#Any#Any#,65
Before Change
n_dims = np.prod(x.shape)
if self.order == "diag" or self.order == "perm":
if self.max_iter > n_dims:
self.max_iter = n_dims
logger.info("`max_iter` was reset to %d because it needs to be //pixels x //channels or less for `order` of %s", n_dims, self.order)
else:
actual_max_iter = self.max_iter
if self.order == "diag":
After Change
indices = self.diagonal_order(x.shape[2], 3)[:self.max_iter]
elif self.order == "perm":
indices = np.random.permutation(n_dims)[:self.max_iter]
indices_size = len(indices)
while indices_size < self.max_iter:
if self.order == "diag":
tmp_indices = self.diagonal_order(x.shape[2], 3)
elif self.order == "perm":
tmp_indices = np.random.permutation(n_dims)
indices = np.hstack((indices, tmp_indices))[:self.max_iter]
indices_size = len(indices)
clip_min = -np.inf
clip_max = np.inf
if hasattr(self.classifier, "clip_values") and self.classifier.clip_values is not None:
clip_min, clip_max = self.classifier.clip_values
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 16
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 32a9e66e0e45b1a6119fcb0e1ed5f74c0d5dab15
Time: 2020-05-28
Author: kz.takemoto@gmail.com
File Name: art/attacks/evasion/simba_pixel.py
Class Name: SimBA_pixel
Method Name: generate
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 32a9e66e0e45b1a6119fcb0e1ed5f74c0d5dab15
Time: 2020-05-28
Author: kz.takemoto@gmail.com
File Name: art/attacks/evasion/universal_simba_pixel.py
Class Name: Universal_SimBA_pixel
Method Name: generate
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 32a9e66e0e45b1a6119fcb0e1ed5f74c0d5dab15
Time: 2020-05-28
Author: kz.takemoto@gmail.com
File Name: art/attacks/evasion/simba_pixel.py
Class Name: SimBA_pixel
Method Name: generate
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 32a9e66e0e45b1a6119fcb0e1ed5f74c0d5dab15
Time: 2020-05-28
Author: kz.takemoto@gmail.com
File Name: art/attacks/evasion/universal_simba_dct.py
Class Name: Universal_SimBA_dct
Method Name: generate
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 32a9e66e0e45b1a6119fcb0e1ed5f74c0d5dab15
Time: 2020-05-28
Author: kz.takemoto@gmail.com
File Name: art/attacks/evasion/simba_dct.py
Class Name: SimBA_dct
Method Name: generate