File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 88"""
99
1010import torch
11- from torch ._six import container_abcs , string_classes , int_classes
11+
12+ # https://github.com/pytorch/pytorch/pull/94709#issuecomment-1461471006
13+ try :
14+ from torch ._six import container_abcs , string_classes , int_classes
15+ except ImportError :
16+ int_classes = int
17+ string_classes = str
18+ import collections .abc as container_abcs
1219
1320from torch .utils .data ._utils import collate as pytorch_collate
1421
Original file line number Diff line number Diff line change 22from typing import Tuple , Dict , Any
33
44import torch
5- from torch ._six import container_abcs , string_classes
5+
6+ # https://github.com/pytorch/pytorch/pull/94709#issuecomment-1461471006
7+ try :
8+ from torch ._six import container_abcs , string_classes
9+ except ImportError :
10+ string_classes = str
11+ import collections .abc as container_abcs
612
713from ..network import Network
814from ..network .monitors import Monitor
You can’t perform that action at this time.
0 commit comments