(self, x)
| 220 | self.resolution = resolution |
| 221 | |
| 222 | def forward(self, x): |
| 223 | B, N, C = x.shape |
| 224 | x = x.view(B, self.resolution, self.resolution, C)[:, ::self.stride, ::self.stride] |
| 225 | return x.reshape(B, -1, C) |
| 226 | |
| 227 | |
| 228 | class Attention(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected