Skip to content

Commit

Permalink
Update workflows for TensorFlow/Keras 2.14
Browse files Browse the repository at this point in the history
Signed-off-by: Beat Buesser <[email protected]>
  • Loading branch information
beat-buesser committed Oct 28, 2023
1 parent 5e259b4 commit 09a2eb8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion art/defences/detector/poison/roni.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import logging
from copy import deepcopy
from typing import Any, Callable, List, Tuple, Union, TYPE_CHECKING
from typing import Callable, List, Tuple, Union, TYPE_CHECKING

import numpy as np
from sklearn.model_selection import train_test_split
Expand Down
4 changes: 2 additions & 2 deletions art/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1305,11 +1305,11 @@ def load_stl() -> DATASET_TYPE:

with open(os.path.join(path, "train_y.bin"), "rb") as f_numpy:
y_train = np.fromfile(f_numpy, dtype=np.uint8)
y_train -= 1
y_train = y_train - 1

with open(os.path.join(path, "test_y.bin"), "rb") as f_numpy:
y_test = np.fromfile(f_numpy, dtype=np.uint8)
y_test -= 1
y_test = y_test - 1

x_train, y_train = preprocess(x_train, y_train)
x_test, y_test = preprocess(x_test, y_test)
Expand Down
2 changes: 2 additions & 0 deletions tests/attacks/evasion/test_auto_attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ def test_classifier_type_check_fail(art_warning):
@pytest.mark.skip_framework("tensorflow1", "tensorflow2v1", "keras", "non_dl_frameworks", "mxnet", "kerastf")
def test_generate_parallel(art_warning, fix_get_mnist_subset, image_dl_estimator):
try:
import tensorflow as tf
classifier, _ = image_dl_estimator(from_logits=True)
classifier.model.compile(optimizer=tf.keras.optimizers.Adam(learning_rate=0.01))

norm = np.inf
eps = 0.3
Expand Down

0 comments on commit 09a2eb8

Please sign in to comment.