def test_2_tensorflow_classifier(self):
        """
        First test with the TensorFlowClassifier.
        :return:
        """
        x_test_original = self.x_test_mnist.copy()

        # Build TensorFlowClassifier
        tfc, sess = get_image_classifier_tf()

        # Attack
        attack_st = SpatialTransformation(
            tfc, max_translation=10.0, num_translations=3, max_rotation=30.0, num_rotations=3, verbose=False
        )
        x_train_adv = attack_st.generate(self.x_train_mnist)

        self.assertAlmostEqual(x_train_adv[0, 8, 13, 0], 0.49004024, delta=0.01)
        self.assertAlmostEqual(attack_st.fooling_rate, 0.71, delta=0.02)

        self.assertEqual(attack_st.attack_trans_x, 3)
        self.assertEqual(attack_st.attack_trans_y, 3)
        self.assertEqual(attack_st.attack_rot, 30.0)

        x_test_adv = attack_st.generate(self.x_test_mnist)

        self.assertAlmostEqual(x_test_adv[0, 14, 14, 0], 0.013572651, delta=0.01)

        # Check that x_test has not been modified by attack and classifier
        self.assertAlmostEqual(float(np.max(np.abs(x_test_original - self.x_test_mnist))), 0.0, delta=0.00001)

        if sess is not None:
            sess.close()

        First test with the TensorFlowClassifier.
        :return:
        
tests/attacks/test_spatial_transformation.py