Merge pull request #1918 from Mingosnake/fix-efficientformerv2-typo

Fix typo in efficientformer_v2
This commit is contained in:
Ross Wightman 2023-08-15 20:04:35 -07:00 committed by GitHub
commit 24fc720d34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -232,7 +232,7 @@ class Attention2dDownsample(torch.nn.Module):
self.attention_biases = nn.Parameter(torch.zeros(num_heads, self.N)) self.attention_biases = nn.Parameter(torch.zeros(num_heads, self.N))
k_pos = torch.stack(torch.meshgrid(torch.arange( k_pos = torch.stack(torch.meshgrid(torch.arange(
self.resolution[1]), self.resolution[0]),
torch.arange(self.resolution[1]))).flatten(1) torch.arange(self.resolution[1]))).flatten(1)
q_pos = torch.stack(torch.meshgrid( q_pos = torch.stack(torch.meshgrid(
torch.arange(0, self.resolution[0], step=2), torch.arange(0, self.resolution[0], step=2),