File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
tests/classifiersFrameworks Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments