From 7869dd67691e16e4c24d9be0a37e43d0a1e7922f Mon Sep 17 00:00:00 2001 From: Fredo Guan Date: Thu, 12 Jan 2023 11:13:17 -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 92a8851f..82e44579 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() + x = x.flatten(1) x = self.norm(x) # (B, H, W, C) -> (B, C) x = self.head(x)