We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d3f952 commit 51fa719Copy full SHA for 51fa719
src/transformers/pytorch_utils.py
@@ -23,8 +23,8 @@
23
24
logger = logging.get_logger(__name__)
25
26
-is_torch_less_than_1_8 = version.parse(torch.__version__) < version.parse("1.8.0")
27
-is_torch_less_than_1_11 = version.parse(torch.__version__) < version.parse("1.11")
+is_torch_less_than_1_8 = version.parse(version.parse(torch.__version__).base_version) < version.parse("1.8.0")
+is_torch_less_than_1_11 = version.parse(version.parse(torch.__version__).base_version) < version.parse("1.11")
28
29
30
def torch_int_div(tensor1, tensor2):
0 commit comments