Skip to content

Commit

Permalink
update collections.abc import
Browse files Browse the repository at this point in the history
  • Loading branch information
Reuben authored and Reuben committed Feb 10, 2021
1 parent db6128d commit 94ca140
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions timm/models/layers/helpers.py
Expand Up @@ -3,13 +3,13 @@
Hacked together by / Copyright 2020 Ross Wightman
"""
from itertools import repeat
from torch._six import container_abcs
import collections.abc


# From PyTorch internals
def _ntuple(n):
def parse(x):
if isinstance(x, container_abcs.Iterable):
if isinstance(x, collections.abc.Iterable):
return x
return tuple(repeat(x, n))
return parse
Expand Down

0 comments on commit 94ca140

Please sign in to comment.