ab69a2253b4229081850280c3346e7a7b1e1815c,art/wrappers/randomized_smoothing.py,RandomizedSmoothing,class_gradient,#RandomizedSmoothing#Any#Any#Any#,122
Before Change
if label is None:
x_new = self._noisy_samples(x_i)
else:
x_new, label = self._noisy_samples(x_i, label[idx])
class_gradient.append(np.mean(self.classifier.class_gradient(x_new, label, logits), axis=0))
return np.array(class_gradient)
def certify(self, x, n):
After Change
:rtype: `np.ndarray`
logger.info("Apply randomized smoothing.")
return self.classifier.class_gradient(x, label, logits)
def certify(self, x, n):
Computes certifiable radius around input `x` and returns radius `r` and prediction.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: ab69a2253b4229081850280c3346e7a7b1e1815c
Time: 2019-07-23
Author: 31593127+robo-sq@users.noreply.github.com
File Name: art/wrappers/randomized_smoothing.py
Class Name: RandomizedSmoothing
Method Name: class_gradient
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 8d863e37c7cf6a0246067ebe8c110b80544c5768
Time: 2018-11-23
Author: mathsinn@ie.ibm.com
File Name: art/attacks/carlini.py
Class Name: CarliniL0Method
Method Name: _loss_gradient
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: c299e46022a9d6cc80e7c6aea975cc8c75627d6a
Time: 2019-08-06
Author: 31593127+robo-sq@users.noreply.github.com
File Name: art/wrappers/randomized_smoothing.py
Class Name: RandomizedSmoothing
Method Name: class_gradient