try gtp vit
This commit is contained in:
		@@ -1238,7 +1238,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, weight):
 | 
			
		||||
    def forward(self, x, weight, token_scales = None):
 | 
			
		||||
        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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user