Skip to content

Commit a9b698e

Browse files
authored
Merge branch 'dev_1.19.1' into development_typing_docs
2 parents d7e9f2b + d3280eb commit a9b698e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

art/attacks/evasion/projected_gradient_descent/projected_gradient_descent_pytorch.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,10 @@ def _projection(
497497
if (suboptimal or norm == 2) and norm != np.inf: # Simple rescaling
498498
values_norm = torch.linalg.norm(values_tmp, ord=norm, dim=1, keepdim=True) # (n_samples, 1)
499499
values_tmp = values_tmp * values_norm.where(
500-
values_norm == 0, torch.minimum(torch.ones(1), torch.tensor(eps).to(values_tmp.device) / values_norm)
500+
values_norm == 0,
501+
torch.minimum(
502+
torch.ones(1).to(values_tmp.device), torch.tensor(eps).to(values_tmp.device) / values_norm
503+
),
501504
)
502505
else: # Optimal
503506
if norm == np.inf: # Easy exact case

requirements_test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ types-setuptools==71.1.0.20240726
6666
# other
6767
requests~=2.32.3
6868
ultralytics==8.0.217
69-
ipython==8.25.0
69+
ipython==8.31.0
7070

7171
# ART
7272
-e .

0 commit comments

Comments
 (0)