Skip to content

Commit bb07aaf

Browse files
authored
Merge branch 'dev_1.6.2' into development_issue_1062
2 parents 61d1601 + e34afae commit bb07aaf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

art/attacks/evasion/adversarial_patch/adversarial_patch_pytorch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ def __init__(
100100
import torch # lgtm [py/repeated-import]
101101
import torchvision
102102

103-
torch_version = list(map(int, torch.__version__.lower().split(".")))
104-
torchvision_version = list(map(int, torchvision.__version__.lower().split(".")))
103+
torch_version = list(map(int, torch.__version__.lower().split("+")[0].split(".")))
104+
torchvision_version = list(map(int, torchvision.__version__.lower().split("+")[0].split(".")))
105105
assert torch_version[0] >= 1 and torch_version[1] >= 7, "AdversarialPatchPyTorch requires torch>=1.7.0"
106106
assert (
107107
torchvision_version[0] >= 0 and torchvision_version[1] >= 8

0 commit comments

Comments
 (0)