From 0f986d7517aca12e59f2566d1ce544df54e4c022 Mon Sep 17 00:00:00 2001 From: thanhvc3 Date: Sun, 28 Apr 2024 15:10:09 +0700 Subject: [PATCH] try gtp vit --- models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index 05d6a2c..91e0b0b 100644 --- a/models.py +++ b/models.py @@ -596,7 +596,7 @@ class FouriER(torch.nn.Module): graph = degree @ graph @ degree for idx, block in enumerate(self.network): - x = block(x, graph) + x = block(x) # output only the features of last layer for image classification return x @@ -1226,7 +1226,7 @@ class PoolFormerBlock(nn.Module): self.layer_scale_2 = nn.Parameter( layer_scale_init_value * torch.ones((dim)), requires_grad=True) - def forward(self, x, graph): + def forward(self, x): 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)