[BUG] Error init with torchversion '2.1.0a0+b5021ba'
micrazy opened this issue · 0 comments
micrazy commented
IS_HIGH_VERSION = tuple(map(int, torch.__version__.split('+')[0].split('.'))) >= (1, 9, 0)
ValueError: invalid literal for int() with base 10: '0a0'
could be:
import torch
from distutils.version import LooseVersion
is_high_version = LooseVersion(torch.version) >= LooseVersion(target_version)