Skip to content

Commit b9bd960

Browse files
authored
Merge pull request #421 from aboutmedicine/master
Update collections.abc import to avoid pytorch 1.8 issue. Fix #420
2 parents db6128d + 94ca140 commit b9bd960

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

timm/models/layers/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
Hacked together by / Copyright 2020 Ross Wightman
44
"""
55
from itertools import repeat
6-
from torch._six import container_abcs
6+
import collections.abc
77

88

99
# From PyTorch internals
1010
def _ntuple(n):
1111
def parse(x):
12-
if isinstance(x, container_abcs.Iterable):
12+
if isinstance(x, collections.abc.Iterable):
1313
return x
1414
return tuple(repeat(x, n))
1515
return parse

0 commit comments

Comments
 (0)