From 68f8fea341739483c6cb4a775f16bbb7fbfce949 Mon Sep 17 00:00:00 2001 From: sirzzang Date: Sun, 20 Oct 2024 18:12:11 +0900 Subject: [PATCH] fix import error for pytorch >= 2.0.0 --- slowfast/datasets/multigrid_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slowfast/datasets/multigrid_helper.py b/slowfast/datasets/multigrid_helper.py index f596e98d..c6d3fb31 100644 --- a/slowfast/datasets/multigrid_helper.py +++ b/slowfast/datasets/multigrid_helper.py @@ -10,7 +10,7 @@ TORCH_MAJOR = int(torch.__version__.split(".")[0]) TORCH_MINOR = int(torch.__version__.split(".")[1]) -if TORCH_MAJOR >= 1 and TORCH_MINOR >= 8: +if TORCH_MAJOR >= 2 or (TORCH_MAJOR == 1 and TORCH_MINOR >= 8): _int_classes = int else: from torch._six import int_classes as _int_classes