mirror of https://github.com/JDAI-CV/fast-reid.git
Update build.py (#692)
parent
39887a102e
commit
817c748e8c
|
@ -8,7 +8,14 @@ import logging
|
|||
import os
|
||||
|
||||
import torch
|
||||
from torch._six import string_classes
|
||||
TORCH_MAJOR = int(torch.__version__.split('.')[0])
|
||||
TORCH_MINOR = int(torch.__version__.split('.')[1])
|
||||
|
||||
if TORCH_MAJOR == 1 and TORCH_MINOR < 8:
|
||||
from torch._six import string_classes
|
||||
else:
|
||||
string_classes = str
|
||||
|
||||
from collections import Mapping
|
||||
|
||||
from fastreid.config import configurable
|
||||
|
|
Loading…
Reference in New Issue