(self, x: torch.Tensor, **kwargs)
| 213 | return self.inner |
| 214 | |
| 215 | def forward(self, x: torch.Tensor, **kwargs) -> Tuple[torch.Tensor, torch.Tensor]: |
| 216 | x = self.inner.patch_embed(x) |
| 217 | if self.inner.pos_embed is not None: |
| 218 | x = x + self.inner.pos_embed |
| 219 | |
| 220 | for blk in self.inner.blocks: |
| 221 | x = blk(x) |
| 222 | |
| 223 | features = x.flatten(1, 2) |
| 224 | |
| 225 | summary = features.mean(dim=1) |
| 226 | |
| 227 | return summary, features |
| 228 | |
| 229 | |
| 230 | class InternViTWrapper(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected