def test_pytorch_iris(self):
    classifier = get_tabular_classifier_pt()
    attack = VirtualAdversarialMethod(classifier, eps=0.1)
    with self.assertRaises(TypeError) as context:
        x_test_iris_adv = attack.generate(self.x_test_iris.astype(np.float32))
    self.assertIn('This attack requires a classifier predicting probabilities in the range [0, 1] as output.Values smaller than 0.0 or larger than 1.0 have been detected.', str(context.exception))
def test_pytorch_iris(self):
    classifier = get_tabular_classifier_pt()
    attack = VirtualAdversarialMethod(classifier, eps=0.1)
    with self.assertRaises(TypeError) as context:
        x_test_iris_adv = attack.generate(self.x_test_iris.astype(np.float32))
    self.assertIn('This attack requires a classifier predicting probabilities in the range [0, 1] as output.Values smaller than 0.0 or larger than 1.0 have been detected.', str(context.exception))