MCPcopy Create free account
hub / github.com/alinlab/SelfPatch / check_torch_version

Function check_torch_version

segmentation/tools/pytorch2torchscript.py:29–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28
29def check_torch_version():
30 torch_minimum_version = '1.8.0'
31 torch_version = digit_version(torch.__version__)
32
33 assert (torch_version >= digit_version(torch_minimum_version)), \
34 f'Torch=={torch.__version__} is not support for converting to ' \
35 f'torchscript. Please install pytorch>={torch_minimum_version}.'
36
37
38def _convert_batchnorm(module):

Callers 1

Calls 1

digit_versionFunction · 0.85

Tested by

no test coverage detected