(self, x: torch.Tensor)
| 236 | return x |
| 237 | |
| 238 | def forward(self, x: torch.Tensor): |
| 239 | x = self.forward_features(x) |
| 240 | x = self.project(x) |
| 241 | |
| 242 | k = self.n - x.shape[1] # number of masked tokens |
| 243 | mask_toks = self.mask_token.expand(x.shape[0], k, -1) |
| 244 | x = torch.cat([x, mask_toks], 1) |
| 245 | x = self.select_tokens(x, self.idx.argsort(1)) |
| 246 | x = x + self.pos_decoder |
| 247 | x = self.decoder(x) |
| 248 | x = self.pixel_project(x) |
| 249 | |
| 250 | return x |
| 251 | |
| 252 | |
| 253 | class MAE(pl.LightningModule): |
nothing calls this directly
no test coverage detected