4fb315c20c8c7e0a346e3b842e91448274224d58,tests/defences/test_adversarial_trainer.py,TestAdversarialTrainer,test_two_attacks,#TestAdversarialTrainer#,185
Before Change
// No reason to assert the newer accuracy is higher. It might go down slightly
self.assertGreaterEqual(acc_new, acc * ACCURACY_DROP)
logger.info("Accuracy before adversarial training: %.2f%%", (acc * 100))
logger.info("\nAccuracy after adversarial training: %.2f%%", (acc_new * 100))
// Check that x_test has not been modified by attack and classifier
self.assertAlmostEqual(float(np.max(np.abs(x_test_original - x_test))), 0.0, delta=0.00001)
After Change
accuracy_new = np.sum(predictions_new == np.argmax(y_test, axis=1)) / NB_TEST
self.assertGreaterEqual(accuracy_new, accuracy)
self.assertEqual(accuracy_new, 0.18181818181818182)
self.assertEqual(accuracy, 0.18181818181818182)
// Check that x_test has not been modified by attack and classifier
self.assertAlmostEqual(float(np.max(np.abs(x_test_original - x_test))), 0.0, delta=0.00001)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 6
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 4fb315c20c8c7e0a346e3b842e91448274224d58
Time: 2020-01-15
Author: beat.buesser@ie.ibm.com
File Name: tests/defences/test_adversarial_trainer.py
Class Name: TestAdversarialTrainer
Method Name: test_two_attacks
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 4fb315c20c8c7e0a346e3b842e91448274224d58
Time: 2020-01-15
Author: beat.buesser@ie.ibm.com
File Name: tests/defences/test_adversarial_trainer.py
Class Name: TestAdversarialTrainer
Method Name: test_two_attacks
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 4fb315c20c8c7e0a346e3b842e91448274224d58
Time: 2020-01-15
Author: beat.buesser@ie.ibm.com
File Name: tests/defences/test_adversarial_trainer.py
Class Name: TestAdversarialTrainer
Method Name: test_fit_predict
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: dba54fabb9d3c87f7d8f2fac66c7163f11480c11
Time: 2020-07-06
Author: killian.levacher@ibm.com
File Name: tests/classifiersFrameworks/test_keras.py
Class Name:
Method Name: test_fit
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 4fb315c20c8c7e0a346e3b842e91448274224d58
Time: 2020-01-15
Author: beat.buesser@ie.ibm.com
File Name: tests/defences/test_adversarial_trainer.py
Class Name: TestAdversarialTrainer
Method Name: test_two_attacks_with_generator