85afa40a630106d83907d0195911971ad3f130d8,art/classifiers/GPy.py,GPyGaussianProcessClassifier,class_gradient,#GPyGaussianProcessClassifier#Any#Any#Any#,64

Before Change


                 `(batch_size, 1, input_shape)` when `label` parameter is specified.
        :rtype: `np.ndarray`
        
        grads = np.zeros((np.shape(x)[0], 2, np.shape(x)[1]))
        for i in range(np.shape(x)[0]):
            // get gradient for the two classes GPC can maximally have
            for i_c in range(2):
                ind = self.predict(x[i].reshape(1, -1))[0, i_c]

After Change


            for i_c in range(2):
                ind = self.predict(x[i].reshape(1, -1))[0, i_c]
                sur = self.predict(np.repeat(x_preprocessed[i].reshape(1, -1),
                                             np.shape(x_preprocessed)[1], 0) + eps * np.eye(np.shape(x_preprocessed)[1]))[:, i_c]
                grads[i, i_c] = ((sur - ind) * eps).reshape(1, -1)

        grads = self._apply_preprocessing_gradient(x, grads)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 85afa40a630106d83907d0195911971ad3f130d8
Time: 2019-08-27
Author: beat.buesser@ie.ibm.com
File Name: art/classifiers/GPy.py
Class Name: GPyGaussianProcessClassifier
Method Name: class_gradient


Project Name: GPflow/GPflow
Commit Name: 41fa0902ddf895045b0a109852d9b2f724e1d808
Time: 2016-01-14
Author: james.hensman@gmail.com
File Name: GPflow/kernels.py
Class Name: White
Method Name: K


Project Name: broadinstitute/keras-rcnn
Commit Name: df93c4e61e7ca1db25f1ee346ac0516685498b02
Time: 2017-08-15
Author: allen.goodman@icloud.com
File Name: keras_rcnn/backend/tensorflow_backend.py
Class Name:
Method Name: bbox_transform_inv