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 39887a1 commit 817c748Copy full SHA for 817c748
fastreid/data/build.py
@@ -8,7 +8,14 @@
8
import os
9
10
import torch
11
-from torch._six import string_classes
+TORCH_MAJOR = int(torch.__version__.split('.')[0])
12
+TORCH_MINOR = int(torch.__version__.split('.')[1])
13
+
14
+if TORCH_MAJOR == 1 and TORCH_MINOR < 8:
15
+ from torch._six import string_classes
16
+else:
17
+ string_classes = str
18
19
from collections import Mapping
20
21
from fastreid.config import configurable
0 commit comments