Update metaformers.py

This commit is contained in:
Fredo Guan 2023-01-08 12:35:08 -08:00
parent cc8575e9d1
commit 3e3010b65e

View File

@ -721,7 +721,7 @@ class MetaFormer(nn.Module):
if pre_logits: if pre_logits:
return x return x
x = x.mean([1,2]) # TODO use adaptive pool instead of mean x = x.mean([-1,-2]) # TODO use adaptive pool instead of mean
x = self.norm(x) x = self.norm(x)
# (B, H, W, C) -> (B, C) # (B, H, W, C) -> (B, C)
x = self.head(x) x = self.head(x)