MCPcopy Create free account
hub / github.com/lingeringlight/START / forward

Method forward

models_mamba.py:549–556  ·  view source on GitHub ↗
(self, x, return_features=False, inference_params=None, if_random_cls_token_position=False, if_random_token_rank=False)

Source from the content-addressed store, hash-verified

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
559def vim_tiny_patch16_224_bimambav2_final_pool_mean_abs_pos_embed_with_midclstok_div2(pretrained=False, **kwargs):

Callers

nothing calls this directly

Calls 2

forward_featuresMethod · 0.95
maxMethod · 0.80

Tested by

no test coverage detected