Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/UCSC-VLAA/OpenVision
/ functions
Functions
716 in github.com/UCSC-VLAA/OpenVision
⨍
Functions
716
◇
Types & classes
90
↳
Endpoints
1
Function
load_obrax_ckpt
(argv)
src/convert_upload/transfer_jax2hf.py:457
Method
lock
(self, unlocked_groups=0, freeze_bn_stats=False)
src/convert_upload/open_clip/modified_resnet.py:154
Method
lock
(self, unlocked_layers: int = 0, freeze_layer_norm: bool = True)
src/convert_upload/open_clip/hf_model.py:171
Method
lock
(self, unlocked_groups=0, freeze_bn_stats=False)
src/convert_upload/open_clip/transformer.py:543
Method
lock_image_tower
(self, unlocked_groups=0, freeze_bn_stats=False)
src/convert_upload/open_clip/model.py:258
Method
lock_image_tower
(self, unlocked_groups=0, freeze_bn_stats=False)
src/convert_upload/open_clip/model.py:346
Method
lock_text_tower
(self, unlocked_layers: int = 0, freeze_layer_norm: bool = True)
src/convert_upload/open_clip/model.py:350
Method
log_timing_avg
Use this when you time sth multiple times per step (eg in a loop).
src/helpers/utils.py:424
Function
loss_fn
(params, images, labels)
src/main_clip.py:429
Function
loss_fn
(params_, imgs, lbls)
src/main_openvision2.py:277
Function
mae_loss
(*, pred, target, mask, norm_pix_loss: bool = True)
src/losses/common.py:327
Function
main
(argv)
src/main_clip.py:78
Function
main
(argv)
src/main_openvision2.py:65
Function
make
Returns gradient transform and learning rate functions.
src/optim/build_optax.py:188
Function
make_for_inference
Makes an input pipeline for inference.
src/datasets/input_pipeline.py:141
Function
make_mask_trees
Returns a boolean mask tree for every pattern (only first match).
src/helpers/utils.py:789
Method
mask_fn
(rng_i, x_i)
src/models/openvision2_model.py:127
Function
matchfirst
(name, _)
src/helpers/utils.py:793
Function
maybe_shard_and_put
(name, x)
src/datasets/input_pipeline.py:260
Function
merge_params
Makes `loaded` pytree match `init`, warning or failing on mismatch. Args: loaded: pytree of parameters, typically loaded from a checkpoint.
src/models/common.py:543
Function
mixup
Perform mixup https://arxiv.org/abs/1710.09412. Args: rng: The random key to use.
src/transforms/mixup.py:190
Method
num_channels
(self)
src/convert_upload/open_clip/transform.py:30
Method
num_examples_per_process
(self, nprocess=None)
src/datasets/tfds.py:68
Function
pack_arg
Packs key-word args as a string to be parsed by `parse_arg()`.
src/configs/common.py:131
Function
pad_model_inputs
r"""Pad model input and generate corresponding input masks. `pad_model_inputs` performs the final packaging of a model's inputs commonly found in
src/transforms/bert_ops.py:191
Function
pad_shard_unpad
Wraps a function with code that pads, shards, then un-shards, un-pads. Args: wrapped: the function to be wrapped. Signature is `params, *args,
src/helpers/utils.py:55
Function
pad_shard_unpad_wrapper
(*args, min_device_batch=None, **kw)
src/helpers/utils.py:86
Function
parse
(x)
src/convert_upload/open_clip/utils.py:50
Function
parse_arg
Makes ConfigDict's get_config single-string argument more usable. Example use in the config file: import big_vision.configs.common as bvcc
src/configs/common.py:29
Method
per2x2_random_grid_indices
(mask)
src/models/vit.py:578
Method
per2x2_random_grid_mask
(mask, index)
src/models/vit.py:586
Function
policy_v0
Autoaugment policy that was used in AutoAugment Paper.
src/transforms/autoaugment.py:53
Function
policy_vtest
Autoaugment test policy for debugging.
src/transforms/autoaugment.py:88
Function
posemb_sincos_2d
Follows the MoCo v3 logic.
src/helpers/utils.py:911
Function
posterize
Equivalent of PIL Posterize.
src/transforms/autoaugment.py:233
Function
prefetch_scalar
(it, nprefetch=1, devices=None)
src/helpers/utils.py:203
Function
prepare_datasets
Returns unbatched `ds_images, ds_texts` datasets. Args: dataset: An image-text `tf.data.Dataset` that is expected to contain the followin
src/evaluators/proj/image_text/retrieval.py:75
Function
prepare_datasets
Returns unbatched `ds_images, ds_texts` datasets.
src/evaluators/proj/image_text/discriminative_classifier.py:69
Function
profile
(name, ttl=3 * 365 * 24 * 3600, noop=False)
src/helpers/utils.py:810
Function
rag_tensor
(raw_tensor)
src/transforms/ops_general.py:219
Function
random_blur
Randomly blur an image. Args: image: `Tensor` representing an image of arbitrary size. height: Height of output image. width: Wi
src/transforms/simclr_aug.py:380
Function
random_brightness
Adjust the brightness of images by a random factor. Equivalent to `adjust_brightness()` using a `delta` randomly picked in the interval `[-max_de
src/transforms/ops_image.py:204
Function
random_color_jitter
(jitter_strength=0.5, impl='simclrv2')
src/transforms/ops_image.py:267
Function
random_color_jitter
(image, p=1.0, jitter_strength=0.5, impl='simclrv2')
src/transforms/simclr_aug.py:370
Function
random_crop_with_resize
Randomly crop and resize an image. Args: image: `Tensor` representing an image of arbitrary size. height: Height of output image.
src/transforms/simclr_aug.py:354
Function
random_mask_tokenize
( texts: Union[str, List[str]], context_length: int, sot_token_id: int, eot_to
src/convert_upload/open_clip/tokenizer.py:281
Method
random_masking
(self, x, mask_ratio, rng_mask=None)
src/models/text_transformer.py:709
Function
recover_dtype
Numpy's `save` stores bfloat16 type as "void" type, so we recover it.
src/helpers/utils.py:681
Method
register
Creates a function that registers its input.
src/helpers/registry.py:141
Function
register_pooler
Decorator registering pooler class
src/convert_upload/open_clip/hf_model.py:39
Function
replace_frozen
Replaces values matching frozen params in `pytree` with `replacement`.
src/optim/build_optax.py:178
Function
replace_linear
(model, linear_replacement, include_modules=['c_fc', 'c_proj'], copy_weights=True)
src/convert_upload/open_clip/utils.py:65
Function
rotate
Rotates the image by degrees either clockwise or counterclockwise. Args: image: An image Tensor of type uint8. degrees: Float, a scalar angl
src/transforms/autoaugment.py:239
Method
run
Computes all metrics.
src/evaluators/proj/image_text/contrastive.py:89
Method
run
Returns metrics.
src/evaluators/proj/image_text/discriminative_classifier.py:461
Function
saturation_foo
()
src/transforms/simclr_aug.py:153
Function
save_checkpoint
Util for checkpointing: saves jax pytree objects to the disk. Args: checkpoint: arbitrary jax pytree to be saved. path: a path to save the
src/helpers/utils.py:693
Function
save_checkpoint_ts
Preemption-safe saving of checkpoints using tssave.
src/helpers/utils.py:1024
Method
save_pretrained
(self, dest)
src/convert_upload/open_clip/tokenizer.py:498
Method
save_pretrained
(self, dest)
src/convert_upload/open_clip/tokenizer.py:575
Function
scan_ffn
(remat_ffn, carry, hidden_states)
src/models/bpt.py:27
Function
scan_kv_block
(carry, args)
src/models/bpt.py:106
Method
set_grad_checkpointing
(self, enable: bool = True)
src/convert_upload/open_clip/coca_model.py:144
Method
set_grad_checkpointing
(self, enable=True)
src/convert_upload/open_clip/modified_resnet.py:162
Method
set_grad_checkpointing
(self, enable=True)
src/convert_upload/open_clip/timm_model.py:143
Method
set_grad_checkpointing
(self, enable=True)
src/convert_upload/open_clip/hf_model.py:189
Method
set_grad_checkpointing
(self, enable=True)
src/convert_upload/open_clip/transformer.py:597
Method
set_grad_checkpointing
(self, enable=True)
src/convert_upload/open_clip/transformer.py:759
Method
set_grad_checkpointing
(self, enable=True)
src/convert_upload/open_clip/transformer.py:915
Method
set_grad_checkpointing
(self, enable=True)
src/convert_upload/open_clip/model.py:354
Method
setup
(self)
src/models/vit.py:48
Function
sharpness
Implements Sharpness function from PIL using TF ops.
src/transforms/autoaugment.py:333
Function
shear_x
Equivalent of PIL Shearing in X dimension.
src/transforms/autoaugment.py:274
Function
shear_y
Equivalent of PIL Shearing in Y dimension.
src/transforms/autoaugment.py:285
Function
sigmoid_xent
(*, logits, labels, reduction=True)
src/losses/common.py:40
Function
simple_mask_tokenize
( texts: Union[str, List[str]], context_length: int, sot_token_id: int, eot_to
src/convert_upload/open_clip/tokenizer.py:310
Function
skip_upper_half
(carry, args)
src/models/bpt.py:126
Function
softmax_xent
(*, logits, labels, mask=None, reduction=True, kl=False, axis=-1, smoothing=0.1)
src/losses/common.py:225
Function
solarize
(image, threshold=128)
src/transforms/three_aug.py:172
Function
solarize
(image, threshold=128)
src/transforms/autoaugment.py:187
Function
solarize_add
(image, addition=0, threshold=128)
src/transforms/autoaugment.py:194
Method
square_mask
(start_height, start_width, mask_height, mask_width)
src/models/vit.py:558
Function
start_input_pipeline
(data, config=None, mesh=None, data_sharding=None, mix_fn=None, tokenizer=None)
src/datasets/input_pipeline.py:242
Function
start_input_pipeline_eval
(data, mesh=None, data_sharding=None, tokenizer=None, context_length=128)
src/datasets/input_pipeline.py:230
Function
start_ragged_input_pipeline
(data, n_prefetch=1, shard=True, ragged=None)
src/datasets/input_pipeline.py:259
Function
step_fn
Step to learning rate function.
src/optim/build_optax.py:114
Function
strict_bool
(x)
src/configs/common.py:110
Function
substitute_prompt
(features)
src/evaluators/proj/image_text/discriminative_classifier.py:96
Function
sync
Syncs hosts and empties async computation queue.
src/helpers/utils.py:756
Function
syntax_mask_tokenize
Returns the tokenized representation of given input string(s). Apply syntax masking before tokenize.
src/convert_upload/open_clip/tokenizer.py:332
Function
temporary_ops
Registers specified pp ops for use in a `with` block. Example use: with pp_registry.remporary_ops( pow=lambda alpha: lambda d: {k: v**
src/helpers/registry.py:168
Method
text_global_pool
(self, x, text: Optional[jnp.ndarray] = None, pool_type: str = 'argmax')
src/models/text_transformer.py:616
Function
text_to_image_retrieval_eval
Runs the text-to-image retrieval eval from the distance matrix. Args: dist_matrix: Distance matrix between text and image embeddings (shape
src/evaluators/proj/image_text/image_text_retrieval.py:25
Function
to_grayscale
(image, keep_channels=True)
src/transforms/simclr_aug.py:48
Function
tokenize
(texts: Union[str, List[str]], context_length: int = DEFAULT_CONTEXT_LENGTH)
src/convert_upload/open_clip/tokenizer.py:277
Function
tokenizer_nltk
:param input_string: numpy.array, :return: tf.tensor string
src/transforms/bert_ops.py:395
Method
total_examples
Returns number of examples in the dataset, regardless of sharding.
src/datasets/core.py:44
Method
total_examples
(self)
src/datasets/tfds.py:64
Function
trace_model
(model, batch_size=256, device=torch.device('cpu'))
src/convert_upload/open_clip/model.py:509
Function
training
Reads the data from a single dataset, or mixes it from multiple. The data is read either from one or mixed from multiple datasets, depending on t
src/datasets/input_pipeline.py:67
← previous
next →
601–700 of 716, ranked by callers