Skip to content

Commit 2e568be

Browse files
author
Beat Buesser
committed
Updates for BaseEstimator.set_params
Signed-off-by: Beat Buesser <[email protected]>
1 parent 2999bf0 commit 2e568be

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/classifiersFrameworks/test_pytorch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ def _test_preprocessing_defences_backward(
101101
# Apply the same backward pass one by one.
102102
x = x_test_mnist
103103
x_intermediates = [x]
104-
for preprocess in classifier.preprocessing[:-1]:
104+
for preprocess in classifier.preprocessing_operations[:-1]:
105105
x = preprocess(x)[0]
106106
x_intermediates.append(x)
107107

108108
gradients = pseudo_gradients
109-
for preprocess, x in zip(classifier.preprocessing[::-1], x_intermediates[::-1]):
109+
for preprocess, x in zip(classifier.preprocessing_operations[::-1], x_intermediates[::-1]):
110110
gradients = preprocess.estimate_gradient(x, gradients)
111111

112112
np.testing.assert_array_almost_equal(gradients_in_chain, gradients, decimal=4)

tests/classifiersFrameworks/test_tensorflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ def _test_preprocessing_defences_backward(
9797
# Apply the same backward pass one by one.
9898
x = x_test_mnist
9999
x_intermediates = [x]
100-
for preprocess in classifier.preprocessing[:-1]:
100+
for preprocess in classifier.preprocessing_operations[:-1]:
101101
x = preprocess(x)[0]
102102
x_intermediates.append(x)
103103

104104
gradients = pseudo_gradients
105-
for preprocess, x in zip(classifier.preprocessing[::-1], x_intermediates[::-1]):
105+
for preprocess, x in zip(classifier.preprocessing_operations[::-1], x_intermediates[::-1]):
106106
gradients = preprocess.estimate_gradient(x, gradients)
107107

108108
np.testing.assert_array_almost_equal(gradients_in_chain, gradients, decimal=4)

0 commit comments

Comments
 (0)