(self, x, return_features=False, inference_params=None, if_random_cls_token_position=False, if_random_token_rank=False)
| 547 | raise NotImplementedError |
| 548 | |
| 549 | def forward(self, x, return_features=False, inference_params=None, if_random_cls_token_position=False, if_random_token_rank=False): |
| 550 | 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) |
| 551 | if return_features: |
| 552 | return x |
| 553 | x = self.head(x) |
| 554 | if self.final_pool_type == 'max': |
| 555 | x = x.max(dim=1)[0] |
| 556 | return x |
| 557 | |
| 558 | @register_model |
| 559 | def vim_tiny_patch16_224_bimambav2_final_pool_mean_abs_pos_embed_with_midclstok_div2(pretrained=False, **kwargs): |
nothing calls this directly
no test coverage detected