Skip to content

Commit 89bac72

Browse files
Reformat projected_gradient_descent_pytorch.py with black
Signed-off-by: salomonhotegni <[email protected]>
1 parent 8da8af3 commit 89bac72

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

art/attacks/evasion/projected_gradient_descent/projected_gradient_descent_pytorch.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,9 @@ def _projection(
501501
)
502502
else: # Optimal
503503
if norm == np.inf: # Easy exact case
504-
values_tmp = values_tmp.sign() * torch.minimum(values_tmp.abs(), torch.tensor(eps).to(values_tmp.device))
504+
values_tmp = values_tmp.sign() * torch.minimum(
505+
values_tmp.abs(), torch.tensor(eps).to(values_tmp.device)
506+
)
505507
elif norm >= 1: # Convex optim
506508
raise NotImplementedError(
507509
"Finite values of `norm_p >= 1` are currently not supported with `suboptimal=False`."

0 commit comments

Comments
 (0)