MCPcopy Create free account
hub / github.com/NVIDIA/semantic-segmentation / torch_version_float

Function torch_version_float

config.py:193–202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

191
192
193def torch_version_float():
194 version_str = torch.__version__
195 version_re = re.search(r'^([0-9]+\.[0-9]+)', version_str)
196 if version_re:
197 version = float(version_re.group(1))
198 logx.msg(f'Torch version: {version}, {version_str}')
199 else:
200 version = 1.0
201 logx.msg(f'Can\'t parse torch version ({version}), assuming {version}')
202 return version
203
204
205def assert_and_infer_cfg(args, make_immutable=True, train_mode=True):

Callers 1

assert_and_infer_cfgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected