705d7ff759a0b76ddf1b30ab8ef135c0b67efa8b,art/attacks/evasion/projected_gradient_descent/projected_gradient_descent_pytorch.py,ProjectedGradientDescentPytorch,generate,#ProjectedGradientDescentPytorch#Any#Any#,123
Before Change
// else 100 * compute_success(self.classifier, x, y, adv_x_best, self.targeted, batch_size=self.batch_size),
// )
return adv_x.cpu().detach().numpy()
def _compute_perturbation(self, batch, batch_labels):
// Pick a small scalar to avoid division by 0
tol = 10e-8
After Change
mask = kwargs.get("mask")
if mask is not None:
// Ensure the mask is broadcastable
if len(mask.shape) > len(x.shape) or mask.shape != x.shape[-len(mask.shape):]:
raise ValueError("Mask shape must be broadcastable to input shape.")
adv_x_best = None
rate_best = None
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 705d7ff759a0b76ddf1b30ab8ef135c0b67efa8b
Time: 2020-04-23
Author: M.N.Tran@ibm.com
File Name: art/attacks/evasion/projected_gradient_descent/projected_gradient_descent_pytorch.py
Class Name: ProjectedGradientDescentPytorch
Method Name: generate
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: c17c92d84ec9216b781ecfbc25c6df225e2fd4f1
Time: 2020-11-11
Author: M.N.Tran@ibm.com
File Name: art/defences/preprocessor/audio_filter_pytorch.py
Class Name: AudioFilterPyTorch
Method Name: __call__
Project Name: arraiy/torchgeometry
Commit Name: e06eee5deec11dc03d6c4975eb9a57f2bc6edd30
Time: 2019-05-28
Author: jiangwei1993@gmail.com
File Name: kornia/utils/image.py
Class Name:
Method Name: tensor_to_image