Fix PyTorch version check (#160)
* Fix PyTorch version check * Fix suggestion Co-authored-by: Jong Wook Kim <jongwook@openai.com>
This commit is contained in:
parent
c7ba4f3907
commit
2867559c5f
|
@ -19,7 +19,7 @@ except ImportError:
|
||||||
BICUBIC = Image.BICUBIC
|
BICUBIC = Image.BICUBIC
|
||||||
|
|
||||||
|
|
||||||
if torch.__version__.split(".") < ["1", "7", "1"]:
|
if [int(n.split("+")[0]) for n in torch.__version__.split(".")] < [1, 7, 1]:
|
||||||
warnings.warn("PyTorch version 1.7.1 or higher is recommended")
|
warnings.warn("PyTorch version 1.7.1 or higher is recommended")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue