From 9efb706b251eaa6f412fd5999b58a07e39750d60 Mon Sep 17 00:00:00 2001 From: Fredo Guan Date: Wed, 18 Jan 2023 12:03:11 -0800 Subject: [PATCH] Update metaformers.py --- timm/models/metaformers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/timm/models/metaformers.py b/timm/models/metaformers.py index 771a0319..c684f22a 100644 --- a/timm/models/metaformers.py +++ b/timm/models/metaformers.py @@ -180,6 +180,7 @@ class RandomMixing(nn.Module): requires_grad=False) def forward(self, x): B, C, H, W = x.shape + print(H*W) x = x.reshape(B, H*W, C) x = torch.einsum('mn, bnc -> bmc', self.random_matrix, x) x = x.reshape(B, C, H, W)