From 840855119530358c7cac67db79a1fd6947ffbbeb Mon Sep 17 00:00:00 2001 From: Fredo Guan Date: Sat, 10 Dec 2022 21:06:37 -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 c48509a1..8291ed84 100644 --- a/timm/models/davit.py +++ b/timm/models/davit.py @@ -819,7 +819,7 @@ class DaViT(nn.Module): def forward_features(self, x): x = self.stages(x) # take final feature and norm - x = self.norms(x[-1].permute(0, 2, 3, 1)).permute(0, 3, 1, 2) + x = self.norms(x.permute(0, 2, 3, 1)).permute(0, 3, 1, 2) #H, W = sizes[-1] #x = x.view(-1, H, W, self.embed_dims[-1]).permute(0, 3, 1, 2).contiguous() return x