From 8568bc7b6a62ad62cdf2ed791a32918edf08954b Mon Sep 17 00:00:00 2001 From: Fredo Guan Date: Sun, 8 Jan 2023 12:13:14 -0800 Subject: [PATCH] Update metaformers.py --- timm/models/metaformers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/timm/models/metaformers.py b/timm/models/metaformers.py index 5afd653f..5734ee04 100644 --- a/timm/models/metaformers.py +++ b/timm/models/metaformers.py @@ -236,9 +236,13 @@ class Downsampling(nn.Module): self.post_norm = post_norm(out_channels) if post_norm else nn.Identity() def forward(self, x): + print(x.shape) x = self.pre_norm(x) + print(x.shape) x = self.conv(x) + print(x.shape) x = self.post_norm(x.permute(0, 2, 3, 1)).permute(0, 3, 1, 2) + print(x.shape) return x class Scale(nn.Module):