(self, x, return_features=False, inference_params=None, if_random_cls_token_position=False, if_random_token_rank=False)
| 543 | raise NotImplementedError |
| 544 | |
| 545 | def forward(self, x, return_features=False, inference_params=None, if_random_cls_token_position=False, if_random_token_rank=False): |
| 546 | x = self.forward_features(x, inference_params, if_random_cls_token_position=if_random_cls_token_position, if_random_token_rank=if_random_token_rank) |
| 547 | if return_features: |
| 548 | return x |
| 549 | x = self.head(x) |
| 550 | if self.final_pool_type == 'max': |
| 551 | x = x.max(dim=1)[0] |
| 552 | return x |
| 553 | |
| 554 | |
| 555 | @register_model |
nothing calls this directly
no test coverage detected