Skip to content

Commit 5257d43

Browse files
author
Beat Buesser
committed
Update tests for ShadowAttack
Signed-off-by: Beat Buesser <[email protected]>
1 parent 4b36a48 commit 5257d43

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/attacks/evasion/test_shadow_attack.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import pytest
2020

2121
import numpy as np
22+
import tensorflow as tf
2223

2324
from art.attacks.evasion import ShadowAttack
2425
from art.estimators.estimator import BaseEstimator, LossGradientsMixin
@@ -37,6 +38,7 @@ def fix_get_mnist_subset(get_mnist_dataset):
3738
yield x_train_mnist[:n_train], y_train_mnist[:n_train], x_test_mnist[:n_test], y_test_mnist[:n_test]
3839

3940

41+
@pytest.mark.skipif(tf.__version__[0] == "1", reason="Skip for TensorFlow 1.x")
4042
@pytest.mark.skipMlFramework("keras", "scikitlearn")
4143
def test_generate(fix_get_mnist_subset, get_image_classifier_list_for_attack):
4244

@@ -62,6 +64,7 @@ def test_generate(fix_get_mnist_subset, get_image_classifier_list_for_attack):
6264
assert np.max(np.abs(x_train_mnist_adv - x_train_mnist[0:1])) == pytest.approx(0.34966960549354553, abs=0.06)
6365

6466

67+
@pytest.mark.skipif(tf.__version__[0] == "1", reason="Skip for TensorFlow 1.x")
6568
@pytest.mark.skipMlFramework("keras", "scikitlearn")
6669
def test_get_regularisation_loss_gradients(fix_get_mnist_subset, get_image_classifier_list_for_attack):
6770

0 commit comments

Comments
 (0)