MCPcopy Create free account

hub / github.com/google-research/scenic / functions

Functions4,921 in github.com/google-research/scenic

↓ 2 callersFunction_adjust_classification_inputs
Adjusts logits and label to have the same shape. Args: logits: Output of model in shape [batch, batch * max_num_captions, num_frames, 1].
scenic/projects/unloc/moment_retrieval_base_model.py:30
↓ 2 callersFunction_adjust_regression_inputs
Adjusts prediction to have the same shape with ground truth. Regression loss is only computed at positive frames. Args: displacements: Predi
scenic/projects/unloc/moment_retrieval_base_model.py:59
↓ 2 callersFunction_apply_global_processing
( ds_pp: tf.data.Dataset, pp_str: str)
scenic/projects/pixel_llm/io/flexio.py:600
↓ 2 callersFunction_apply_global_processing
( ds_pp: tf.data.Dataset, pp_str: str)
scenic/projects/streaming_dvc/io/flexio.py:295
↓ 2 callersFunction_apply_global_processing
( ds_pp: tf.data.Dataset, pp_str: str)
scenic/dataset_lib/flexio/flexio.py:465
↓ 2 callersFunction_attention_dropout
Applies dropout on attention weights. This always applies the dropout. There is no `deterministic` parameter. Arguments: attn_weights: Atten
scenic/model_lib/layers/attention_layers.py:40
↓ 2 callersFunction_batch_and_prefetch
(ds, batch_size)
scenic/projects/streaming_dvc/io/flexio.py:249
↓ 2 callersFunction_batch_and_prefetch
(ds, batch_size)
scenic/dataset_lib/flexio/flexio.py:419
↓ 2 callersFunction_bbox_overlap
Find Bounding box overlap. Args: boxes: first set of bounding boxes gt_boxes: second set of boxes to compute IOU Returns: iou: Inter
scenic/projects/baselines/centernet/modeling/nms.py:30
↓ 2 callersFunction_bbox_overlap
Find Bounding box overlap. Args: boxes: first set of bounding boxes gt_boxes: second set of boxes to compute IOU Returns: iou: Inter
scenic/projects/baselines/segment_anything/modeling/nms.py:30
↓ 2 callersFunction_box_loss_weights
This function is to compute the weights for box loss.
scenic/projects/unloc/moment_retrieval_base_model.py:95
↓ 2 callersFunction_build_pipeline
Build a tf.data.Dataset pipeline using clu.deterministic_data. The pipeline has the following steps: 0. All used datasets should have text label
scenic/projects/owl_vit/preprocessing/input_pipeline.py:300
↓ 2 callersMethod_build_with_weight_sharing
Builds TAL head with shared decoders.
scenic/projects/unloc/heads.py:149
↓ 2 callersMethod_build_without_weight_sharing
Builds TAL head with separate decoders.
scenic/projects/unloc/heads.py:201
↓ 2 callersFunction_bytes_feature
(value)
scenic/projects/baselines/centernet/tools/build_coco_tfrecord.py:61
↓ 2 callersFunction_bytes_feature
(value)
scenic/projects/densevoc/tools/build_vg_tfrecord.py:68
↓ 2 callersFunction_bytes_feature
(value)
scenic/projects/pixel_llm/tools/build_uninext_ref_tfrecord.py:86
↓ 2 callersFunction_bytes_feature
(value)
scenic/projects/pixel_llm/tools/build_vg_tfrecord.py:70
↓ 2 callersFunction_cls_loss_weights
This function is to compute the weights for classification.
scenic/projects/unloc/moment_retrieval_base_model.py:78
↓ 2 callersFunction_compute_cover
Computes a cover for the bipartite graph. We compute a cover using the construction provided at https://en.wikipedia.org/wiki/K%C5%91nig%27s_theo
scenic/model_lib/matchers/hungarian_cover.py:348
↓ 2 callersMethod_compute_final_fields
Calculate sub-metric values which only depend on other values.
scenic/projects/densevoc/chota.py:304
↓ 2 callersFunction_fewshot_acc_fn
Computes (x,y) linear regression accuracy on (x_test, y_test). Args: x: An [n_examples, n_classes] matrix of feature representations. This will
scenic/train_lib/transfer/fewshot_utils.py:107
↓ 2 callersFunction_filename_to_compression
(filename: str)
scenic/projects/svvit/datasets/pileup_coverage_dataset.py:42
↓ 2 callersFunction_find_augmenting_path
Finds an augmenting path given an assignment and an adjacency matrix. The augmenting path search starts from the unassigned workers, then goes on
scenic/model_lib/matchers/hungarian_cover.py:105
↓ 2 callersFunction_fix_old_checkpoints
Makes old checkpoints forward-compatible.
scenic/projects/owl_vit/models.py:67
↓ 2 callersFunction_fix_old_layernorm
Fix layer norm numbering of old checkpoints.
scenic/projects/owl_vit/models.py:35
↓ 2 callersFunction_fix_resblock_naming
Fix resblock naming of old checkpoints.
scenic/projects/owl_vit/models.py:52
↓ 2 callersFunction_flatten_params
Flattens a dictionary, keeping empty leaves.
scenic/train_lib/pretrain_utils.py:220
↓ 2 callersMethod_forward_box
Forward box head and get losses or post-processed predictions. Args: features: A sorted list of (B, Hi, Wi, C) features. proposals: a
scenic/projects/baselines/centernet/modeling/roi_heads.py:251
↓ 2 callersMethod_generate_examples
Yields examples.
scenic/projects/boundary_attention/kaleidoshapes/kaleidoshapes.py:160
↓ 2 callersMethod_get_abs_pos
Calculate absolute positional embeddings. If needed, resize embeddings and remove cls_token dimension for the original embeddings. Args
scenic/projects/gerald/models/git_vit.py:273
↓ 2 callersMethod_get_abs_pos
Calculate absolute positional embeddings. If needed, resize embeddings and remove cls_token dimension for the original embeddings. Args
scenic/projects/streaming_dvc/modeling/vit.py:268
↓ 2 callersFunction_get_attention_module
Returns an attention module.
scenic/projects/fast_vit/model_utils.py:324
↓ 2 callersMethod_get_camera_noise
Generates camera noise.
scenic/projects/boundary_attention/helpers/additive_noise_model.py:156
↓ 2 callersFunction_get_default_configs_for_testing
()
scenic/projects/baselines/resnet.py:264
↓ 2 callersFunction_get_default_configs_for_testing
()
scenic/projects/baselines/bit_resnet.py:340
↓ 2 callersFunction_get_einsum_weights
Combines the 1d index & their interpolation weights to do einsum. Args: grid: (T, output_size * sampling_ratio), 1d grid for each box.
scenic/projects/baselines/centernet/modeling/roi_align.py:69
↓ 2 callersFunction_get_eval_iter
(dataset, split, pp_eval)
scenic/projects/knowledge_visual_language/data/wiki_image_text_generation_dataset.py:273
↓ 2 callersFunction_get_eval_iter
(dataset, split, pp_eval)
scenic/projects/knowledge_visual_language/data/cc12m_generation_dataset.py:211
↓ 2 callersFunction_get_eval_iter
(dataset, split, pp_eval)
scenic/projects/knowledge_visual_language/data/web_image_text_generation_dataset.py:232
↓ 2 callersFunction_get_eval_iter
(dataset, split, pp_eval)
scenic/projects/knowledge_visual_language/data/okvqa_dataset.py:214
↓ 2 callersFunction_get_eval_iter
(dataset, split, pp_eval)
scenic/projects/knowledge_visual_language/data/vqa_dataset.py:216
↓ 2 callersFunction_get_eval_iter
(dataset, split, pp_eval, dataset_dir)
scenic/dataset_lib/big_transfer/bit.py:153
↓ 2 callersFunction_get_fake_detection_example
Manually create a single example that has known results.
scenic/projects/baselines/detr/tests/test_train_utils.py:216
↓ 2 callersFunction_get_feature
(feature_type: str, shape=(), dtype='string')
scenic/projects/pixel_llm/io/flexio.py:47
↓ 2 callersFunction_get_feature
(feature_type: str, shape=(), dtype='string')
scenic/projects/streaming_dvc/io/flexio.py:33
↓ 2 callersFunction_get_input_batch_from_one_prompt
Prepares input data from one prompt. Args: batch: A batch of input data. num_classes: Number of classes. prompt_index: The index of pro
scenic/projects/unloc/eval_utils.py:196
↓ 2 callersFunction_get_input_spec
(ds)
scenic/projects/pixel_llm/io/flexio.py:642
↓ 2 callersFunction_get_input_spec
(ds)
scenic/projects/streaming_dvc/io/flexio.py:339
↓ 2 callersFunction_get_input_spec
(ds)
scenic/dataset_lib/flexio/flexio.py:506
↓ 2 callersFunction_get_integer_list_feature
(example, name)
scenic/projects/knowledge_visual_language/data/data_utils.py:278
↓ 2 callersMethod_get_method_fn
Returns method_fn function corresponding to method str.
scenic/model_lib/base_models/tests/test_box_utils.py:214
↓ 2 callersFunction_get_num_eval_examples
(dataset, split, data_dir)
scenic/projects/knowledge_visual_language/data/wiki_image_text_generation_dataset.py:302
↓ 2 callersFunction_get_num_eval_examples
(dataset, split, data_dir)
scenic/projects/knowledge_visual_language/data/cc12m_generation_dataset.py:239
↓ 2 callersFunction_get_num_eval_examples
(dataset, split, data_dir)
scenic/projects/knowledge_visual_language/data/web_image_text_generation_dataset.py:258
↓ 2 callersFunction_get_num_eval_examples
(dataset, split, data_dir)
scenic/projects/knowledge_visual_language/data/okvqa_dataset.py:240
↓ 2 callersFunction_get_num_eval_examples
(dataset, split, data_dir)
scenic/projects/knowledge_visual_language/data/vqa_dataset.py:242
↓ 2 callersFunction_get_num_eval_examples
(dataset, split, data_dir)
scenic/dataset_lib/big_transfer/bit.py:174
↓ 2 callersFunction_get_optimizer
(train_state)
scenic/projects/av_mae/mbt.py:921
↓ 2 callersMethod_get_perlin_noise
Generates perlin noise.
scenic/projects/boundary_attention/helpers/additive_noise_model.py:113
↓ 2 callersFunction_get_random_offset
Generates a random offset for sampling the sequence.
scenic/projects/unloc/datasets/dataset_utils.py:384
↓ 2 callersMethod_get_repr
Compute representation for the whole dataset.
scenic/train_lib/transfer/fewshot_utils.py:236
↓ 2 callersMethod_get_repr
Compute representation for the whole dataset.
scenic/train_lib/transfer/fewshot_utils.py:420
↓ 2 callersMethod_get_repr
Compute representation for the whole dataset.
scenic/projects/baselines/bert/train_utils.py:337
↓ 2 callersMethod_get_result_lists
Gets result lists for the task and dataset.
scenic/projects/layout_denoise/train_utils.py:154
↓ 2 callersFunction_get_shape
Gets tensor shape as a list, allowing mixing static and dynamic shapes.
scenic/dataset_lib/video_ops.py:38
↓ 2 callersMethod_get_splits
Returns class_splits and split_names.
scenic/projects/polyvit/polyvit_base_model.py:305
↓ 2 callersFunction_get_variant_args
Return self-attention variant specific list of attn args.
scenic/projects/fast_vit/model_utils.py:338
↓ 2 callersFunction_handle_legacy_format
Handle legacy format. To remove this function, make sure all checkpoints that are to be loaded are in the non-legacy format: * checkpoint['pa
scenic/projects/baselines/deformable_detr/trainer.py:190
↓ 2 callersFunction_int64_feature
(value)
scenic/projects/densevoc/tools/build_vg_tfrecord.py:76
↓ 2 callersFunction_int64_feature
(value)
scenic/projects/pixel_llm/tools/build_vg_tfrecord.py:78
↓ 2 callersFunction_is_forbidden_label
Checks which elements of string tensor 'labels' are forbidden.
scenic/projects/owl_vit/preprocessing/label_ops.py:572
↓ 2 callersFunction_is_none
Helper to check if sched itself or (fn, base_lr) of sched are None.
scenic/train_lib/optax.py:82
↓ 2 callersFunction_make_hashable
(x)
scenic/projects/owl_vit/notebooks/numpy_cache.py:57
↓ 2 callersFunction_maximum_bipartite_matching
Performs maximum bipartite matching using augmented paths. Args: adj_matrix: A bool [b, n, m] array, where each element of the inner matrix
scenic/model_lib/matchers/hungarian_cover.py:308
↓ 2 callersMethod_normalize_distance
Normalizes predicted distances to the start and end times.
scenic/projects/unloc/heads.py:134
↓ 2 callersFunction_parse_policy_info
Return the function that corresponds to `name` and update `level` param.
scenic/dataset_lib/big_transfer/preprocessing/autoaugment.py:552
↓ 2 callersFunction_partition_parameters
Partitions parameters into frozen and learned parameter trees. Args: params: Pytree of model parameters. frozen_mapping: Dictionary mapping
scenic/projects/pixel_llm/partition_utils.py:255
↓ 2 callersFunction_partition_parameters
Partitions parameters into frozen and learned parameter trees. Args: params: Pytree of model parameters. frozen_mapping: Dictionary mapping
scenic/projects/streaming_dvc/partition_utils.py:191
↓ 2 callersMethod_pe_encoding
PE encoding.
scenic/projects/baselines/segment_anything/modeling/prompt_encoder.py:185
↓ 2 callersFunction_plot_boxes
Adds boxes to the provided Bokeh plot.
scenic/projects/owl_vit/notebooks/plotting.py:162
↓ 2 callersFunction_pred_probs
Adds the predicted probabilities to prediction dict.
scenic/projects/layout_denoise/trainer.py:44
↓ 2 callersFunction_replace_dict
Replaces values in model dictionary with restored ones from checkpoint.
scenic/train_lib/pretrain_utils.py:36
↓ 2 callersFunction_reshape_to_time_space
(x, temporal_dims)
scenic/projects/vivit/model.py:78
↓ 2 callersFunction_resize
Resizes the image. Args: image: Tensor; Input image. image_size: int; Image size. Returns: Resized image.
scenic/dataset_lib/imagenet_dataset.py:87
↓ 2 callersMethod_sample_cxcywh_bbox
Samples a bounding box in the [cx, cy, w, h] in [0, 1] range format.
scenic/projects/baselines/detr/tests/test_train_utils.py:135
↓ 2 callersMethod_sample_random_crop_region
Randomly samples a crop region (bounding box) for random cropping. The region is represented as two tensors, `begin` and `size`, which can be
scenic/projects/owl_vit/preprocessing/image_ops.py:254
↓ 2 callersFunction_shuffle_batch
(ds, bs, train)
scenic/projects/layout_denoise/datasets/dataset.py:303
↓ 2 callersFunction_split_frozen
Computes `frozen_mask` and updates `masks` and `scheds`.
scenic/train_lib/optax.py:79
↓ 2 callersFunction_stateless_bernoulli_trial
(seed: tf.Tensor, p: float = 0.5)
scenic/projects/owl_vit/preprocessing/image_ops.py:144
↓ 2 callersFunction_translate_level_to_arg
(level, translate_const)
scenic/dataset_lib/big_transfer/preprocessing/autoaugment.py:506
↓ 2 callersFunction_tree_merge
(tree1, tree2)
scenic/projects/pixel_llm/partition_utils.py:77
↓ 2 callersFunction_undo_make_hashable
(x)
scenic/projects/owl_vit/notebooks/numpy_cache.py:61
↓ 2 callersFunction_unflatten
(x)
scenic/projects/av_mae/mbt.py:1010
↓ 2 callersFunction_validate_and_normalize_config
Validates dataset_configs and normalizes it to a common format. Common and train/eval-mode-specific configs are merged into one. TFDS data dirs a
scenic/projects/owl_vit/preprocessing/input_pipeline.py:395
↓ 2 callersFunction_wait
(future: Optional[futures.Future])
scenic/projects/baselines/detr/trainer.py:356
↓ 2 callersFunction_wait
(future: Optional[futures.Future])
scenic/projects/baselines/deformable_detr/evaluate.py:93
↓ 2 callersMethodact
Multiplies the stack of H masks M (shape [L, L] each) by the inp. tensor. We denote by L the length of the input sequence and by H the numbe
scenic/projects/performer/performer.py:541
↓ 2 callersMethodact_step
(self, x)
scenic/projects/adatape/layers.py:95
↓ 2 callersFunctionadd_beam_dim
Creates new beam dimension in non-scalar array and tiles into it.
scenic/projects/avatar/decode.py:50
← previousnext →301–400 of 4,921, ranked by callers