get_torch_version

lib.utils.get_torch_version() tuple[int, int]

Obtain the major. minor version of currently installed PyTorch.

Return type:

A tuple of the form (major, minor) representing the version of PyTorch that is installed

Example

>>> from lib.utils import get_torch_version
>>> get_torch_version()
(2, 2)