We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00b8bdf commit 1863c9fCopy full SHA for 1863c9f
art/attacks/evasion/adversarial_patch/adversarial_patch_pytorch.py
@@ -100,8 +100,8 @@ def __init__(
100
import torch # lgtm [py/repeated-import]
101
import torchvision
102
103
- torch_version = list(map(int, torch.__version__.lower().split(".")))
104
- torchvision_version = list(map(int, torchvision.__version__.lower().split(".")))
+ torch_version = list(map(int, torch.__version__.lower().split('+')[0].split(".")))
+ torchvision_version = list(map(int, torchvision.__version__.lower().split('+')[0].split(".")))
105
assert torch_version[0] >= 1 and torch_version[1] >= 7, "AdversarialPatchPyTorch requires torch>=1.7.0"
106
assert (
107
torchvision_version[0] >= 0 and torchvision_version[1] >= 8
0 commit comments