Skip to content

Commit adeac34

Browse files
author
Beat Buesser
committed
Update type
Signed-off-by: Beat Buesser <[email protected]>
1 parent 6a4956e commit adeac34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

art/attacks/evasion/projected_gradient_descent/projected_gradient_descent_tensorflow_v2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def _apply_perturbation(
304304
"""
305305
import tensorflow as tf # lgtm [py/repeated-import]
306306

307-
perturbation_step = eps_step * perturbation
307+
perturbation_step = tf.constant(eps_step, dtype=ART_NUMPY_DTYPE) * perturbation
308308
perturbation_step = tf.where(tf.math.is_nan(perturbation_step), 0, perturbation_step)
309309
x = x + perturbation_step
310310
if self.estimator.clip_values is not None:

0 commit comments

Comments
 (0)