From d40d4c8c2aea37ec9257ad982cb745f606069598 Mon Sep 17 00:00:00 2001 From: Fredo Guan Date: Thu, 12 Jan 2023 11:16:05 -0800 Subject: [PATCH] Update metaformers.py --- timm/models/metaformers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timm/models/metaformers.py b/timm/models/metaformers.py index 82e44579..01857167 100644 --- a/timm/models/metaformers.py +++ b/timm/models/metaformers.py @@ -749,7 +749,7 @@ class MetaFormer(nn.Module): return x x = self.global_pool(x) - x = x.flatten(1) + x = x.squeeze() x = self.norm(x) # (B, H, W, C) -> (B, C) x = self.head(x)