07ebba0b5978711bf60c9502766b1f3f6f62ce78,art/attacks/spatial_transformation_unittests.py,TestSpatialTransformation,test_tfclassifier,#TestSpatialTransformation#,60

Before Change


        attack_params = {"max_translation": 10.0, "num_translations": 1, "max_rotation": 30.0, "num_rotations": 1}
        st = SpatialTransformation(tfc)
        x_train_adv = st.generate(x_train, **attack_params)
        self.assertTrue((st.fooling_rate >= 0.2))

        // x_test_adv = x_test + up.v
        // self.assertFalse((x_test == x_test_adv).all())

After Change


        self.assertTrue(attack_st.attack_trans_y == 3)
        self.assertTrue(attack_st.attack_rot == 30.0)

        x_test_adv = attack_st.generate(x_test)

        self.assertTrue(abs(x_test_adv[0, 14, 14, 0] - 0.013572651) <= 0.01)

    def test_krclassifier(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 07ebba0b5978711bf60c9502766b1f3f6f62ce78
Time: 2019-01-22
Author: beat.buesser@ie.ibm.com
File Name: art/attacks/spatial_transformation_unittests.py
Class Name: TestSpatialTransformation
Method Name: test_tfclassifier


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 07ebba0b5978711bf60c9502766b1f3f6f62ce78
Time: 2019-01-22
Author: beat.buesser@ie.ibm.com
File Name: art/attacks/spatial_transformation_unittests.py
Class Name: TestSpatialTransformation
Method Name: test_krclassifier


Project Name: tensorflow/cleverhans
Commit Name: f9dd2e3636db61ee1b4d32ee4f494fd9e71adc12
Time: 2017-03-29
Author: ngp5056@cse.psu.edu
File Name: cleverhans/attacks.py
Class Name: FastGradientMethod
Method Name: generate_np