df504d916235e97ed68d204afc7cc435bce2168a,art/attacks/boundary.py,BoundaryAttack,_orthogonal_perturb,#BoundaryAttack#Any#Any#Any#,257
Before Change
// Project the perturbation onto sphere
direction = original_sample - current_sample
perturb = np.swapaxes(perturb, 0, self.classifier.channel_index - 1)
direction = np.swapaxes(direction, 0, self.classifier.channel_index - 1)
for i in range(direction.shape[0]):
direction[i] /= np.linalg.norm(direction[i])
perturb[i] -= np.dot(perturb[i], direction[i]) * direction[i]
After Change
perturb[:, :, i] -= np.dot(perturb[:, :, i], direction[:, :, i]) * direction[:, :, i]
elif len(self.classifier.input_shape) == 1:
direction /= np.linalg.norm(direction)
perturb -= np.dot(perturb, direction.T) * direction
else:
raise ValueError("Input shape not recognised.")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 2
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: df504d916235e97ed68d204afc7cc435bce2168a
Time: 2019-08-07
Author: beat.buesser@ie.ibm.com
File Name: art/attacks/boundary.py
Class Name: BoundaryAttack
Method Name: _orthogonal_perturb
Project Name: scikit-image/scikit-image
Commit Name: c9e8356cf6458e6a6316fd014fdc55ad3251aadb
Time: 2016-05-01
Author: aizvorski@gmail.com
File Name: skimage/color/colorconv.py
Class Name:
Method Name: _convert
Project Name: SheffieldML/GPy
Commit Name: ba84a43ea392c03234a04a851088da0d15a5a76d
Time: 2012-11-30
Author: james.hensman@gmail.com
File Name: GPy/models/sparse_GP_regression.py
Class Name: sparse_GP_regression
Method Name: dL_dZ