From c31588cc5fe06369993dcedc6e338d648e84e0f7 Mon Sep 17 00:00:00 2001 From: thanhvc3 Date: Sat, 27 Apr 2024 11:45:24 +0700 Subject: [PATCH] try swin --- models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models.py b/models.py index cdb0fd4..aac4772 100644 --- a/models.py +++ b/models.py @@ -915,7 +915,7 @@ class PoolFormerBlock(nn.Module): B, C, H, W = x.shape x_windows = window_partition(x, self.window_size) x_windows = x_windows.view(-1, self.window_size * self.window_size, C) - attn_windows = self.token_mixer(self.norm1(x_windows), mask=self.attn_mask) + attn_windows = self.token_mixer(x_windows, mask=self.attn_mask) attn_windows = attn_windows.view(-1, self.window_size, self.window_size, C) x_attn = window_reverse(attn_windows, self.window_size, H, W) if self.use_layer_scale: