Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ant-research/DreamLIP
/ functions
Functions
432 in github.com/ant-research/DreamLIP
⨍
Functions
432
◇
Types & classes
72
↓ 1 callers
Method
__init__
(self, input_filename, transforms, img_key,
training/data.py:143
↓ 1 callers
Function
_build_text_decoder_tower
( embed_dim, multimodal_cfg, quick_gelu: bool = False, cast_dtype: Optional[to
open_clip/coca_model.py:53
↓ 1 callers
Function
_camel2snake
(s)
open_clip/hf_model.py:31
↓ 1 callers
Function
_convert_openclip_transformer
(module: Transformer, prefix)
open_clip/big_vision.py:102
↓ 1 callers
Function
_convert_openclip_txt
(module: TextTransformer, prefix)
open_clip/big_vision.py:121
↓ 1 callers
Function
_convert_timm_img
(module, prefix)
open_clip/big_vision.py:33
↓ 1 callers
Method
_generate_beamsearch
( self, image_inputs, pad_token_id=None, eos_token_id=None,
open_clip/coca_model.py:310
↓ 1 callers
Method
_load_image
(self, id: int)
dataloaders/coco.py:41
↓ 1 callers
Method
_load_target
(self, id: int)
dataloaders/coco.py:45
↓ 1 callers
Function
_natural_key
(string_)
open_clip/factory.py:29
↓ 1 callers
Function
_setup_size
(size, error_msg)
open_clip/transform.py:85
↓ 1 callers
Function
accuracy
(output, target, topk=(1,))
training/zero_shot.py:11
↓ 1 callers
Method
attention
( self, q_x: torch.Tensor, k_x: Optional[torch.Tensor] = None,
open_clip/transformer.py:216
↓ 1 callers
Function
batched
Batch data into lists of length *n*. The last batch may be shorter. NOTE based on more-itertools impl, to be replaced by python 3.12 itertools.bat
open_clip/zero_shot_classifier.py:9
↓ 1 callers
Method
bpe
(self, token)
open_clip/tokenizer.py:166
↓ 1 callers
Method
build_attention_mask
(self)
open_clip/transformer.py:772
↓ 1 callers
Method
build_causal_mask
(self)
open_clip/transformer.py:656
↓ 1 callers
Method
build_cls_mask
(self, text, cast_dtype: torch.dtype)
open_clip/transformer.py:664
↓ 1 callers
Function
build_zero_shot_classifier
Build zero-shot classifier weights by iterating over class names in batches Args: model: CLIP model instance tokenizer: CLIP toke
open_clip/zero_shot_classifier.py:21
↓ 1 callers
Function
center_crop_or_pad
Center crops and/or pads the given image. If the image is torch Tensor, it is expected to have [..., H, W] shape, where ... means an arbitrary
open_clip/transform.py:177
↓ 1 callers
Function
const_lr
(optimizer, base_lr, warmup_length, steps)
training/scheduler.py:13
↓ 1 callers
Function
const_lr_cooldown
(optimizer, base_lr, warmup_length, steps, cooldown_steps, cooldown_power=1.0, cooldown_end_lr=0.)
training/scheduler.py:24
↓ 1 callers
Function
convert_int8_model_to_inference_mode
(model)
open_clip/utils.py:84
↓ 1 callers
Function
convert_to_custom_text_state_dict
(state_dict: dict)
open_clip/model.py:540
↓ 1 callers
Function
copy_codebase
(args)
main.py:500
↓ 1 callers
Function
cosine_lr
(optimizer, base_lr, warmup_length, steps)
training/scheduler.py:43
↓ 1 callers
Function
create_loss
(args)
open_clip/factory.py:328
↓ 1 callers
Function
create_model_from_pretrained
( model_name: str, pretrained: Optional[str] = None, precision: str = 'fp32',
open_clip/factory.py:437
↓ 1 callers
Function
default_bpe
()
open_clip/tokenizer.py:26
↓ 1 callers
Function
download_pretrained
( cfg: Dict, force_hf_hub: bool = False, cache_dir: Union[str, None] = None, )
open_clip/pretrained.py:543
↓ 1 callers
Method
encode
(self, text)
open_clip/tokenizer.py:207
↓ 1 callers
Method
fetch_file
Shortcut to reader's `fetch_file()`.
training/data.py:358
↓ 1 callers
Method
fetch_file
Shortcut to reader's `fetch_file()`.
training/data.py:463
↓ 1 callers
Method
forward
(self, image_features, text_features, logit_scale, logit_scale_local, local_image_features=None, output_dict=F
open_clip/loss.py:295
↓ 1 callers
Function
gather_features
( image_features, text_features, local_loss=False, gather_with_grad=False,
open_clip/loss.py:55
↓ 1 callers
Function
generate_readme
(model_card: dict, model_name: str)
open_clip/push_to_hf_hub.py:209
↓ 1 callers
Function
get_2d_sincos_pos_embed
grid_size: int of the grid height and width return: pos_embed: [grid_size*grid_size, embed_dim] or [1+grid_size*grid_size, embed_dim] (w/
open_clip/pos_embed.py:20
↓ 1 callers
Function
get_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
open_clip/pos_embed.py:38
↓ 1 callers
Function
get_clip_metrics
(image_features, text_features, logit_scale)
training/train.py:374
↓ 1 callers
Function
get_data
(args, preprocess_fns, epoch=0, tokenizer=None)
training/data.py:1139
↓ 1 callers
Function
get_dataset_size
(shards)
training/data.py:560
↓ 1 callers
Function
get_dci
(args, preprocess_fns, subtest, tokenizer)
training/data.py:628
↓ 1 callers
Function
get_default_params
(model_name)
training/params.py:5
↓ 1 callers
Function
get_dist_info
()
dataloaders/utils.py:26
↓ 1 callers
Method
get_ground_truth
(self, device, dtype, num_logits, negative_only=False)
open_clip/loss.py:646
↓ 1 callers
Method
get_ground_truth_multicap
(self, device, num_logits, M, N)
open_clip/loss.py:190
↓ 1 callers
Method
get_ground_truth_ot
(self, device, num_logits, M, N)
open_clip/loss.py:178
↓ 1 callers
Function
get_latest_checkpoint
(path: str, remote : bool)
main.py:55
↓ 1 callers
Method
get_logits
(self, image_features, text_features, logit_scale, logit_bias=None)
open_clip/loss.py:652
↓ 1 callers
Function
get_order
(x)
open_clip/tokenizer.py:343
↓ 1 callers
Method
get_params
Get parameters
open_clip/transform.py:126
↓ 1 callers
Method
get_random_ops
(self)
training/random_aug.py:415
↓ 1 callers
Function
get_reduction_mask_fn
Choose strategy for dropping (masking) tokens to achieve target context length
open_clip/tokenizer.py:384
↓ 1 callers
Function
group_by_keys_nothrow
Return function over iterator that groups key, value pairs into samples. :param keys: function that splits the key into key and extension (base_p
training/data.py:697
↓ 1 callers
Function
image_transform
( image_size: Union[int, Tuple[int, int]], is_train: bool, mean: Optional[Tuple[float,
open_clip/transform.py:284
↓ 1 callers
Function
init_distributed_device
(args)
training/distributed.py:63
↓ 1 callers
Method
init_parameters
(self)
open_clip/modified_resnet.py:141
↓ 1 callers
Method
init_parameters
(self)
open_clip/transformer.py:469
↓ 1 callers
Method
init_parameters
(self)
open_clip/transformer.py:629
↓ 1 callers
Function
is_global_master
(args)
training/distributed.py:12
↓ 1 callers
Function
is_local_master
(args)
training/distributed.py:16
↓ 1 callers
Function
is_using_distributed
()
training/distributed.py:35
↓ 1 callers
Function
list_models
enumerate available model architectures based on config files
open_clip/factory.py:57
↓ 1 callers
Function
list_openai_models
Returns the names of available CLIP models
open_clip/openai.py:19
↓ 1 callers
Function
list_pretrained_models_by_tag
return all models having the specified pretrain tag
open_clip/pretrained.py:442
↓ 1 callers
Function
list_pretrained_tags_by_model
return all pretrain tags for the specified model architecture
open_clip/pretrained.py:452
↓ 1 callers
Function
load_big_vision_weights
Load weights from .npz checkpoints for official Google big_vision image-text models Currently the SigLIP source models are supported and a Custo
open_clip/big_vision.py:9
↓ 1 callers
Function
load_openai_model
Load a CLIP model Parameters ---------- name : str A model name listed by `clip.available_models()`, or the path to a model check
open_clip/openai.py:24
↓ 1 callers
Function
load_state_dict
(checkpoint_path: str, map_location='cpu')
open_clip/factory.py:130
↓ 1 callers
Method
lock_image_tower
(self, unlocked_groups=0, freeze_bn_stats=False)
open_clip/model.py:301
↓ 1 callers
Method
lock_text_tower
(self, unlocked_layers: int = 0, freeze_layer_norm: bool = True)
open_clip/model.py:437
↓ 1 callers
Function
main
(args)
main.py:71
↓ 1 callers
Function
main
()
training/profiler.py:205
↓ 1 callers
Function
maybe_compute_generative_loss
(model_out)
training/train.py:394
↓ 1 callers
Function
neighbour_exchange
(from_rank, to_rank, tensor, group=None)
open_clip/loss.py:528
↓ 1 callers
Function
neighbour_exchange_bidir
(left_rank, right_rank, tensor_to_left, tensor_to_right, group=None)
open_clip/loss.py:548
↓ 1 callers
Function
neighbour_exchange_bidir_with_grad
(left_rank, right_rank, tensor_to_left, tensor_to_right, group=None)
open_clip/loss.py:612
↓ 1 callers
Method
pairwise_circleloss
( self, dist_mat, is_pos, margin=0.25, gamma=64)
open_clip/loss.py:269
↓ 1 callers
Method
pairwise_contrastive_loss
(self, a, b, device, logit_scale=1.0)
open_clip/loss.py:257
↓ 1 callers
Function
parse_args
(args)
training/params.py:26
↓ 1 callers
Function
posterize_level_to_args
(MAX_LEVEL)
training/random_aug.py:345
↓ 1 callers
Function
prepare_inputs_for_generation
(input_ids, image_inputs, past=None, **kwargs)
open_clip/coca_model.py:459
↓ 1 callers
Function
profile_fvcore
( model, image_input_size=(3, 224, 224), text_input_size=(77,), batch_size=1,
training/profiler.py:23
↓ 1 callers
Function
profile_fvcore_image
( model, image_input_size=(3, 224, 224), batch_size=1, detailed=False,
training/profiler.py:63
↓ 1 callers
Function
profile_fvcore_text
( model, text_input_size=(77,), batch_size=1, detailed=False, force_cp
training/profiler.py:44
↓ 1 callers
Function
profile_model
(model_name, batch_size=1, profiler='torch')
training/profiler.py:128
↓ 1 callers
Function
profile_torch
Profile the full model using torch.utils.flop_counter
training/profiler.py:110
↓ 1 callers
Function
profile_torch_image
Profile the image encoder using torch.utils.flop_counter
training/profiler.py:82
↓ 1 callers
Function
profile_torch_text
Profile the text encoder using torch.utils.flop_counter
training/profiler.py:96
↓ 1 callers
Function
pt_load
(file_path, map_location=None)
training/file_utils.py:69
↓ 1 callers
Function
push_pretrained_to_hf_hub
( model_name, pretrained: str, repo_id: str, precision: str = 'fp32', image_mean: Optional
open_clip/push_to_hf_hub.py:160
↓ 1 callers
Function
push_to_hf_hub
( model, tokenizer, model_config: Optional[dict], repo_id: str, commit_message: str = 'Add
open_clip/push_to_hf_hub.py:90
↓ 1 callers
Function
read_csv
(csv_files)
training/data.py:80
↓ 1 callers
Function
read_long_csv
(csv_files, use_longcap = False)
training/data.py:100
↓ 1 callers
Function
remote_sync_fsspec
(local_dir, remote_dir)
training/file_utils.py:20
↓ 1 callers
Function
remote_sync_s3
(local_dir, remote_dir)
training/file_utils.py:10
↓ 1 callers
Function
replace_linear
(model, linear_replacement, include_modules=['c_fc', 'c_proj'], copy_weights=True)
open_clip/utils.py:65
↓ 1 callers
Method
reset_parameters
(self)
open_clip/model.py:236
↓ 1 callers
Function
resize_pos_embed
(state_dict, model, interpolation: str = 'bicubic', antialias: bool = True)
open_clip/model.py:633
↓ 1 callers
Function
resize_text_pos_embed
(state_dict, model, interpolation: str = 'linear', antialias: bool = False)
open_clip/model.py:667
← previous
next →
101–200 of 432, ranked by callers