MCPcopy Create free account

hub / github.com/WalBouss/GEM / functions

Functions23 in github.com/WalBouss/GEM

↓ 2 callersMethod__init__
(self, vit)
gem/gem_utils.py:152
↓ 2 callersFunctioncreate_gem_model
( model_name: str, pretrained: Optional[str] = None, gem_depth: int = 7, ss_at
gem/gem.py:91
↓ 2 callersMethodencode_text
(self, text: list)
gem/gem_wrapper.py:44
↓ 2 callersFunctionget_gem_img_transform
( img_size: Union[int, Tuple[int, int]] = (448, 448), mean: Optional[Tuple[float, ...]] = Non
gem/gem.py:76
↓ 2 callersMethodmin_max
(self, logits)
gem/gem_wrapper.py:51
↓ 2 callersFunctionvisualize
(image, text, logits, alpha=0.6, save_path=None)
gem/gem.py:150
↓ 1 callersFunction_read_reqs
(relpath)
setup.py:14
↓ 1 callersMethodapply_gem
(self)
gem/gem_wrapper.py:22
↓ 1 callersFunctionavailable_models
Returns the names of available GEM-VL models
gem/gem.py:61
↓ 1 callersMethodbatched_forward
:param image: torch.Tensor [B, 3, H, W] :param text: list[list[]] :param normalize: bool - if True performs min-max normaliza
gem/gem_wrapper.py:87
↓ 1 callersFunctionresample_abs_pos_embed
( posemb, new_size: List[int], old_size: Optional[List[int]] = None, num_prefi
gem/gem_utils.py:12
Method__init__
(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0., proj_drop=0., ss_attn_iter=1,
gem/gem_utils.py:46
Method__init__
(self, res_block)
gem/gem_utils.py:127
Method__init__
(self, model, tokenizer, depth=7, ss_attn_iter=1, ss_attn_temp=None)
gem/gem_wrapper.py:12
Functionchange_to_url
(url)
app.py:34
Functionchange_weights
Handle changing model's weights triggered by a Dropdown module change.
app.py:26
Functioncreate_model_and_transforms
( model_name: str, pretrained: Optional[str] = None, gem_depth: int = 7, preci
gem/gem.py:124
Methodforward
(self, x, attn_bias=None, prev_attn=None)
gem/gem_utils.py:60
Methodforward
(self, q_x: torch.Tensor, k_x: Optional[torch.Tensor] = None,
gem/gem_utils.py:131
Methodforward
:param image: torch.Tensor [1, 3, H, W] :param text: list[] :param normalize: bool - if True performs min-max normalization
gem/gem_wrapper.py:58
Functionget_tokenizer
Wrapper around openclip get_tokenizer function
gem/gem.py:67
Functionmodified_vit_forward
(self, x: torch.Tensor)
gem/gem_utils.py:155
Functionviz_func
(url, image, text, model_weights)
app.py:38