66c20cc2157d7f18530c742ce6d71685f8699020,tests/classifiers/test_tensorflow.py,TestTensorFlowClassifier,setUpClass,#Any#,46
Before Change
def setUpClass(cls):
(x_train, y_train), (x_test, y_test), _, _ = load_dataset("mnist")
cls.x_train = x_train[:NB_TRAIN]
cls.y_train = y_train[:NB_TRAIN]
cls.x_test = x_test[:NB_TEST]
cls.y_test = y_test[:NB_TEST]
cls.classifier, cls.sess = get_classifier_tf()
cls.classifier_logits, _ = get_classifier_tf(from_logits=True)
After Change
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.classifier, cls.sess = get_classifier_tf()
cls.classifier_logits, _ = get_classifier_tf(from_logits=True)
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 18
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 66c20cc2157d7f18530c742ce6d71685f8699020
Time: 2020-01-16
Author: beat.buesser@ie.ibm.com
File Name: tests/classifiers/test_tensorflow.py
Class Name: TestTensorFlowClassifier
Method Name: setUpClass
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 66c20cc2157d7f18530c742ce6d71685f8699020
Time: 2020-01-16
Author: beat.buesser@ie.ibm.com
File Name: tests/classifiers/test_tensorflow.py
Class Name: TestTensorFlowClassifier
Method Name: setUpClass
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 66c20cc2157d7f18530c742ce6d71685f8699020
Time: 2020-01-16
Author: beat.buesser@ie.ibm.com
File Name: tests/classifiers/test_keras_tf.py
Class Name: TestKerasClassifierTF
Method Name: setUpClass
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 66c20cc2157d7f18530c742ce6d71685f8699020
Time: 2020-01-16
Author: beat.buesser@ie.ibm.com
File Name: tests/classifiers/test_ensemble.py
Class Name: TestEnsembleClassifier
Method Name: setUpClass
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 66c20cc2157d7f18530c742ce6d71685f8699020
Time: 2020-01-16
Author: beat.buesser@ie.ibm.com
File Name: tests/classifiers/test_keras.py
Class Name: TestKerasClassifier
Method Name: setUpClass
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 66c20cc2157d7f18530c742ce6d71685f8699020
Time: 2020-01-16
Author: beat.buesser@ie.ibm.com
File Name: tests/classifiers/test_blackbox.py
Class Name: TestBlackBoxClassifier
Method Name: setUpClass