Skip to content

Commit

Permalink
Merge pull request #421 from aboutmedicine/master
Browse files Browse the repository at this point in the history
Update collections.abc import to avoid pytorch 1.8 issue. Fix #420
  • Loading branch information
rwightman committed Feb 10, 2021
2 parents db6128d + 94ca140 commit b9bd960
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions timm/models/layers/helpers.py
Original file line number Diff line number Diff line change
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

1 comment on commit b9bd960

@moghadas76
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix version 0.3.2

Please sign in to comment.