From e46e371804393738812e7838a63ce210e3dfeb78 Mon Sep 17 00:00:00 2001 From: Fredo Guan Date: Sat, 10 Dec 2022 00:35:43 -0800 Subject: [PATCH] Update davit.py --- timm/models/davit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timm/models/davit.py b/timm/models/davit.py index 19261ea7..08f31746 100644 --- a/timm/models/davit.py +++ b/timm/models/davit.py @@ -36,7 +36,7 @@ __all__ = ['DaViT'] class SequentialWithSize(nn.Sequential): def forward(self, x: Tensor, size: Tuple[int, int]): - for module in self: + for module in self._modules.values(): output = module(x, size) x : Tensor = output[0] size : Tuple[int, int] = output[1]