From 8965410b5541a804a47506c053569d9d46d0a638 Mon Sep 17 00:00:00 2001 From: Fredo Guan Date: Thu, 8 Dec 2022 05:51:39 -0800 Subject: [PATCH] Update davit.py --- timm/models/davit.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/timm/models/davit.py b/timm/models/davit.py index 4b04d535..f8f61d73 100644 --- a/timm/models/davit.py +++ b/timm/models/davit.py @@ -36,12 +36,8 @@ __all__ = ['DaViT'] class MySequential(nn.Sequential): - def __init__(self, *args, **kwargs): - super(MySequential, self).__init__(*args, **kwargs) - - def forward(self, inputs : Tensor, size : Tuple[int, int]): - for module in self._modules.values(): + for module in self: inputs = module(inputs, size) return inputs