MCPcopy Create free account

hub / github.com/UCSC-VLAA/OpenVision / functions

Functions716 in github.com/UCSC-VLAA/OpenVision

↓ 118 callersFunction_pcfg
(url='', hf_hub='', **kwargs)
src/convert_upload/open_clip/pretrained.py:29
↓ 47 callersFunction_n2p
(w, t=True)
src/convert_upload/open_clip/convert.py:21
↓ 28 callersFunctionwrite_note
(note)
src/main_clip.py:128
↓ 16 callersMethodload
(self, ckpt={})
src/helpers/utils.py:406
↓ 15 callersFunctionwrite_note
(note)
src/main_openvision2.py:115
↓ 13 callersFunction_slpcfg
(url='', hf_hub='', **kwargs)
src/convert_upload/open_clip/pretrained.py:42
↓ 13 callersMethodtokenize
(self, text)
src/convert_upload/open_clip/tokenizer.py:534
↓ 11 callersFunctionget_steps
(name, default=ValueError, cfg=config)
src/main_clip.py:211
↓ 11 callersFunctionunbox_logicallypartioned
Unboxes the flax.LogicallyPartitioned pieces Args: boxed_pytree: a pytree that includes LogicallyPartitioned leaves. Returns: a pyt
src/helpers/sharding.py:25
↓ 10 callersMethod__init__
( self, dim: int, num_heads: int = 8, qkv_bias: bool = True,
src/convert_upload/open_clip/transformer.py:90
↓ 10 callersMethodmeasure
Logs the metric value.
src/helpers/utils.py:859
↓ 8 callersFunction_create_bert_tokenizer
(vocab_path, add_bos=False, add_eos=False)
src/transforms/bert_ops.py:44
↓ 8 callersFunctionreshard
Take an arbitrarily* sharded pytree and shard it according to `shardings`. This is a no-op for tree elements which are already sharded as request
src/helpers/sharding.py:59
↓ 8 callersMethodsave
(self)
src/helpers/utils.py:398
↓ 7 callersFunction_apcfg
(url='', hf_hub='', **kwargs)
src/convert_upload/open_clip/pretrained.py:55
↓ 7 callersFunctionitstime
Returns True if it's time to execute an action. Args: step: the current step representing "now". every_n_steps: the action should run every
src/helpers/utils.py:209
↓ 7 callersFunctionrandom_apply
Randomly apply function func to x with probability p.
src/transforms/simclr_aug.py:24
↓ 7 callersMethodrun
Returns metrics.
src/evaluators/proj/image_text/retrieval.py:305
↓ 7 callersFunctiontree_flatten_with_names
Populates tree_flatten with leaf names. This function populates output of tree_flatten with leaf names, using a custom traversal that produces na
src/helpers/utils.py:509
↓ 6 callersFunctioncreate_orbax_checkpoint_manager
Returns specified Orbax (async or not) CheckpointManager or None if checkpointing is disabled.
src/helpers/utils.py:1142
↓ 6 callersFunctionpp
(title, names, indent=" ")
src/models/common.py:590
↓ 6 callersFunctionredux
(x)
src/losses/common.py:86
↓ 6 callersFunctionscale_channel
Scale the 2D image using the autocontrast rule.
src/transforms/autoaugment.py:305
↓ 6 callersFunctiontokenizer_eval
(inkey)
src/configs/openvision2.py:260
↓ 5 callersFunction_make_mask_trees
(params, patterns_values, log)
src/optim/build_optax.py:281
↓ 5 callersFunction_ntuple
(n)
src/convert_upload/open_clip/utils.py:49
↓ 5 callersFunctiondownload_pretrained_from_hf
( model_id: str, filename: str = 'open_clip_pytorch_model.bin', revision=None,
src/convert_upload/open_clip/pretrained.py:616
↓ 5 callersMethodencode_text
(self, text, normalize: bool = False)
src/convert_upload/open_clip/model.py:271
↓ 5 callersFunctionget_model_config
(model_name)
src/convert_upload/open_clip/factory.py:80
↓ 5 callersFunctionmerge_preprocess_dict
Merge overlay key-value pairs on top of base preprocess cfg or dict. Input dicts are filtered based on PreprocessCfg fields.
src/convert_upload/open_clip/transform.py:40
↓ 5 callersMethodpause
(self, wait_for=())
src/helpers/utils.py:389
↓ 5 callersFunctionprefetch_iterator
Runs iterator `it` ahead for `n` steps. Adapted from flax.
src/datasets/input_pipeline.py:192
↓ 5 callersMethodresume
(self)
src/helpers/utils.py:394
↓ 5 callersMethodstep_end
Ends a training step, write its full row.
src/helpers/utils.py:877
↓ 5 callersMethodstep_start
(self, step)
src/helpers/utils.py:855
↓ 5 callersMethodtick
A chronometer tick.
src/helpers/utils.py:320
↓ 5 callersFunctionunwrap
Unwraps an image produced by wrap. Where there is a 0 in the last channel for every spatial position, the rest of the three channels in that spati
src/transforms/autoaugment.py:419
↓ 5 callersFunctionwrap
Returns 'image' with an extra channel set to all 1s.
src/transforms/autoaugment.py:411
↓ 5 callersMethodwrite
(metrics)
src/helpers/utils.py:881
↓ 4 callersFunction_build_vision_tower
( embed_dim: int, vision_cfg: CLIPVisionCfg, quick_gelu: bool = False, cast_dt
src/convert_upload/open_clip/model.py:106
↓ 4 callersFunction_clean_tag
(tag: str)
src/convert_upload/open_clip/pretrained.py:514
↓ 4 callersMethod_encode_image
(self, images, normalize: bool = True)
src/convert_upload/open_clip/coca_model.py:149
↓ 4 callersFunction_get_hf_config
(model_id, cache_dir=None)
src/convert_upload/open_clip/factory.py:87
↓ 4 callersMethod_loss
(self, image_features, text_features, logit_scale, logit_bias=None, negative_only=False)
src/convert_upload/open_clip/loss.py:349
↓ 4 callersMethod_make_layer
(self, planes, blocks, stride=1)
src/convert_upload/open_clip/modified_resnet.py:132
↓ 4 callersFunction_mccfg
(url='', hf_hub='', **kwargs)
src/convert_upload/open_clip/pretrained.py:68
↓ 4 callersFunction_randomly_negate_tensor
With 50% prob turn the tensor negative.
src/transforms/autoaugment.py:473
↓ 4 callersFunction_translate_level_to_arg
(level, translate_const)
src/transforms/autoaugment.py:516
↓ 4 callersFunctionbasic_clean
(text)
src/convert_upload/open_clip/tokenizer.py:67
↓ 4 callersFunctionblend
Blend image1 and image2 using 'factor'. Factor can be above 0.0. A value of 0.0 means only image1 is used. A value of 1.0 means only image2 is us
src/transforms/autoaugment.py:99
↓ 4 callersFunctionblockwise_attn
( query, key, value, bias=None, deterministic=True, dropout_rng=None,
src/models/bpt.py:50
↓ 4 callersMethodclose
(self)
src/helpers/utils.py:889
↓ 4 callersMethoddecode
(self, tokens)
src/convert_upload/open_clip/tokenizer.py:222
↓ 4 callersMethodglobal_registry
()
src/helpers/registry.py:137
↓ 4 callersFunctionhms
Format time in hours/minutes/seconds.
src/helpers/utils.py:254
↓ 4 callersFunctioninfo
(s, *a)
src/main_clip.py:125
↓ 4 callersMethodinform
Provide some extra info that's only known later in the program.
src/helpers/utils.py:304
↓ 4 callersMethodlog_timing
Use this when you time sth once per step and want instant flushing.
src/helpers/utils.py:413
↓ 4 callersMethodsave_pretrained
(self, dest)
src/convert_upload/open_clip/tokenizer.py:427
↓ 4 callersFunctionstartstop_prof
Runs the profiler for `surround` steps around the next `log_steps`.
src/helpers/utils.py:818
↓ 4 callersFunctionsteps
Gets duration named `prefix` out of `config` and converts it to steps. Using this function to access a configuration value that denotes some kind
src/optim/build_optax.py:24
↓ 3 callersFunction_build_text_tower
( embed_dim: int, text_cfg: CLIPTextCfg, quick_gelu: bool = False, cast_dtype:
src/convert_upload/open_clip/model.py:175
↓ 3 callersMethod_global_pool
(self, x: torch.Tensor)
src/convert_upload/open_clip/transformer.py:600
↓ 3 callersFunction_parse_policy_info
Return the function that corresponds to `name` and update `level` param.
src/transforms/autoaugment.py:578
↓ 3 callersMethod_split_heads
(self, hidden_states, num_heads, head_dim)
src/models/text_transformer.py:311
↓ 3 callersMethod_split_heads
(self, hidden_states, num_heads, head_dim)
src/models/common.py:470
↓ 3 callersFunction_square875
(sz)
src/configs/clip_common.py:47
↓ 3 callersFunctioncreate_mesh
Creates a device mesh with each slice in its own data parallel group.
src/helpers/sharding.py:41
↓ 3 callersMethodencode
(self, text)
src/convert_upload/open_clip/tokenizer.py:214
↓ 3 callersMethodencode_image
(self, image, normalize: bool = False)
src/convert_upload/open_clip/model.py:267
↓ 3 callersFunctionevaluators
()
src/main_clip.py:631
↓ 3 callersFunctionfreeze_batch_norm_2d
Converts all `BatchNorm2d` and `SyncBatchNorm` layers of provided module into `FrozenBatchNorm2d`. If `module` is itself an instance of eithe
src/convert_upload/open_clip/utils.py:9
↓ 3 callersFunctionget_cast_dtype
(precision: str)
src/convert_upload/open_clip/model.py:88
↓ 3 callersFunctionget_clean_fn
(type: str)
src/convert_upload/open_clip/tokenizer.py:94
↓ 3 callersMethodget_logits
(self, image_features, text_features, logit_scale)
src/convert_upload/open_clip/loss.py:102
↓ 3 callersFunctionget_order
(x)
src/transforms/bert_ops.py:59
↓ 3 callersFunctionget_pretrained_cfg
(model: str, tag: str)
src/convert_upload/open_clip/pretrained.py:550
↓ 3 callersMethodget_tfdata
Creates this data object as a tf.data.Dataset. This will be called separately in each process, and it is up to the dataset implementation to
src/datasets/core.py:25
↓ 3 callersFunctionimage_transform_v2
( cfg: PreprocessCfg, is_train: bool, aug_cfg: Optional[Union[Dict[str, Any], Augmenta
src/convert_upload/open_clip/transform.py:393
↓ 3 callersFunctioninfo
(s, *a)
src/main_openvision2.py:112
↓ 3 callersFunctionload_checkpoint
Loads a jax pytree from a npz file. Args: tree: deprecated, use None. Bwd-compat for old format that only stored values: the pytree struc
src/helpers/utils.py:144
↓ 3 callersMethodlock
lock modules Args: unlocked_groups (int): leave last n layer groups unlocked (default: 0)
src/convert_upload/open_clip/timm_model.py:110
↓ 3 callersFunctionmaybe_repeat
(arg, n_reps)
src/helpers/registry.py:35
↓ 3 callersFunctionmerge_preprocess_kwargs
(base: PreprocessCfg, **kwargs)
src/convert_upload/open_clip/transform.py:57
↓ 3 callersFunctionmin_tensor
(a, b)
src/transforms/autoaugment.py:546
↓ 3 callersFunctionrecover_tree
Recovers a tree as a nested dict from flat names and values. This function is useful to analyze checkpoints that are saved by our programs withou
src/helpers/utils.py:722
↓ 3 callersFunctionshould_merge
(name)
src/models/common.py:565
↓ 3 callersFunctionstartstop_prof_at_steps
( sess, step=None, first_step=None, last_step=None, name="steps", ttl=3 * 365 * 24 * 3600)
src/helpers/utils.py:827
↓ 3 callersFunctiontext_global_pool
(x, text: Optional[torch.Tensor] = None, pool_type: str = 'argmax')
src/convert_upload/open_clip/transformer.py:655
↓ 2 callersMethod__init__
( self, local_loss=False, gather_with_grad=False, cache_labels
src/convert_upload/open_clip/loss.py:68
↓ 2 callersMethod__init__
(self, inplanes, planes, stride=1)
src/convert_upload/open_clip/modified_resnet.py:13
↓ 2 callersMethod__init__
(self, use_pooler_output=True)
src/convert_upload/open_clip/hf_model.py:67
↓ 2 callersFunction_add_tpu_host_options
(data)
src/datasets/input_pipeline.py:185
↓ 2 callersFunction_canonicalize
Returns canonicalized `text` (lowercase and puncuation removed). Args: text: string to be canonicalized. keep_punctuation_exact_string: If
src/evaluators/proj/image_text/prompt_engineering.py:105
↓ 2 callersFunction_convert_openclip_txt
(module: TextTransformer, prefix)
src/convert_upload/open_clip/convert.py:125
↓ 2 callersFunction_convert_timm_img
(module, prefix)
src/convert_upload/open_clip/convert.py:37
↓ 2 callersMethod_embed
Embeds features name `name` using `embed_fn`. Args: name: Feature name to be embedded. train_state: train_state for the predict
src/evaluators/proj/image_text/retrieval.py:223
↓ 2 callersMethod_encode_text
(self, text, normalize: bool = True)
src/convert_upload/open_clip/coca_model.py:154
↓ 2 callersFunction_get_gaussian_kernel
Compute 1D Gaussian kernel.
src/transforms/three_aug.py:62
↓ 2 callersFunction_get_hf_config_tokenizer
(model_id, cache_dir=None)
src/convert_upload/transfer_jax2hf.py:564
next →1–100 of 716, ranked by callers