From a1882204eab13f8bcb85ef226083e71a910b3605 Mon Sep 17 00:00:00 2001 From: Fredo Guan Date: Tue, 17 Jan 2023 12:33:51 -0800 Subject: [PATCH] Revert "Update metaformers.py" This reverts commit 32bede4e279ee1027a63d5b55591153e53c209ec. --- timm/models/metaformers.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/timm/models/metaformers.py b/timm/models/metaformers.py index 87018b47..dc83c185 100644 --- a/timm/models/metaformers.py +++ b/timm/models/metaformers.py @@ -809,12 +809,12 @@ class MetaFormer(nn.Module): if pre_logits: return x - x = self.global_pool(x) - x = x.squeeze() - x = self.norm(x) + #x = self.global_pool(x) + #x = x.squeeze() + #x = self.norm(x) # (B, H, W, C) -> (B, C) - x = self.head(x) - #x=self.head(self.norm(x.mean([2, 3]))) + #x = self.head(x) + x=self.head(self.norm(x.mean([2, 3]))) return x def forward_features(self, x):