32a9e66e0e45b1a6119fcb0e1ed5f74c0d5dab15,art/attacks/evasion/universal_simba_pixel.py,Universal_SimBA_pixel,generate,#Universal_SimBA_pixel#Any#Any#,72
Before Change
n_dims = np.prod(x[0].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: 3
Non-data size: 8
Instances
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: home-assistant/home-assistant
Commit Name: 68c1dd7cd47c516df765a1742a62abca5c3d5f83
Time: 2015-09-14
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/automation/__init__.py
Class Name:
Method Name: setup
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