2b61ba08f09b39f3200659178ace8fa38421af29,art/classifiers/detector_classifier_unittest.py,TestDetectorClassifier,test_class_gradient,#TestDetectorClassifier#,99
Before Change
self.assertTrue(np.sum(grads) != 0)
// Test logits = True and label = array
label = np.random.randint(11, size=NB_TEST)
grads = dc.class_gradient(x=x_test, logits=True, label=label)
self.assertTrue(np.array(grads.shape == (NB_TEST, 1, 1, 28, 28)).all())
self.assertTrue(np.sum(grads) != 0)
After Change
for i2 in range(grads.shape[2]):
for i3 in range(grads.shape[3]):
for i4 in range(grads.shape[4]):
result = self._derivative(x_test, i1, i2, i3, i4, True)
print(np.sum(result), np.sum(grads[:, i1, i2, i3, i4]))
self.assertAlmostEqual(np.sum(result), np.sum(grads[:, i1, i2, i3, i4]))
//for i in range(grads.shape[0]):
// print(result[i], grads[i, i1, i2, i3, i4])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 2b61ba08f09b39f3200659178ace8fa38421af29
Time: 2019-03-20
Author: M.N.Tran@ibm.com
File Name: art/classifiers/detector_classifier_unittest.py
Class Name: TestDetectorClassifier
Method Name: test_class_gradient
Project Name: osmr/imgclsmob
Commit Name: 09e4a76102ff4a06a835180237ea171eb475985c
Time: 2018-09-19
Author: osemery@gmail.com
File Name: keras_/models/mobilenet.py
Class Name:
Method Name: _test
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 2b61ba08f09b39f3200659178ace8fa38421af29
Time: 2019-03-20
Author: M.N.Tran@ibm.com
File Name: art/classifiers/detector_classifier_unittest.py
Class Name: TestDetectorClassifier
Method Name: test_class_gradient
Project Name: ray-project/ray
Commit Name: 5d3c9c8861ee658b7931bb374603f86987c17433
Time: 2020-12-19
Author: amogkam@users.noreply.github.com
File Name: python/ray/tune/examples/mlflow_example.py
Class Name:
Method Name: