a4376fc2e3c1eec67decf36bc0a1771ad17a771e,src/attacks/newtonfool_unittest.py,TestNewtonFool,test_krclassifier,#TestNewtonFool#,71
Before Change
krc.fit(x_train, y_train, batch_size=batch_size, nb_epochs=2)
print(krc.predict(x_test))
print(krc.predict(x_test, logits=True))
grads = krc.class_gradient(x_test, logits=False)
import numpy as np
print("min is: ", np.min(grads), ", max is: ", np.max(grads))
After Change
y_pred = krc.predict(x_test)
y_pred_adv = krc.predict(x_test_adv)
y_pred_bool = y_pred.max(axis=1, keepdims=1) == y_pred
y_pred_max = y_pred.max(axis=1)
y_pred_adv_max = y_pred_adv[y_pred_bool]
self.assertTrue((y_pred_max >= y_pred_adv_max).all())
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: a4376fc2e3c1eec67decf36bc0a1771ad17a771e
Time: 2018-04-24
Author: M.N.Tran@ibm.com
File Name: src/attacks/newtonfool_unittest.py
Class Name: TestNewtonFool
Method Name: test_krclassifier
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 85e42ea64f4d6fdebb88e5360025de2ec4e34ea0
Time: 2019-04-25
Author: beat.buesser@ie.ibm.com
File Name: art/attacks/fast_gradient.py
Class Name: FastGradientMethod
Method Name: generate
Project Name: rasbt/mlxtend
Commit Name: b46079a21209220f92ee274f4498e120e9a1b762
Time: 2018-09-23
Author: kmori05@gmail.com
File Name: mlxtend/regressor/tests/test_stacking_regression.py
Class Name:
Method Name: test_weight_ones