try modify swin
This commit is contained in:
parent
b661823661
commit
8866ea448e
@ -978,7 +978,6 @@ class PoolFormerBlock(nn.Module):
|
|||||||
img_mask[:, :, h, w] = cnt
|
img_mask[:, :, h, w] = cnt
|
||||||
cnt += 1
|
cnt += 1
|
||||||
|
|
||||||
print(self.input_resolution)
|
|
||||||
mask_windows = window_partition(img_mask, self.window_size) # nW, window_size, window_size, 1
|
mask_windows = window_partition(img_mask, self.window_size) # nW, window_size, window_size, 1
|
||||||
mask_windows = mask_windows.view(-1, self.window_size * self.window_size)
|
mask_windows = mask_windows.view(-1, self.window_size * self.window_size)
|
||||||
attn_mask = mask_windows.unsqueeze(1) - mask_windows.unsqueeze(2)
|
attn_mask = mask_windows.unsqueeze(1) - mask_windows.unsqueeze(2)
|
||||||
|
Loading…
Reference in New Issue
Block a user