MCPcopy Create free account

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

Functions6,154 in github.com/google-research/language

Functionjson_file_to_dict
Constructs a dictionary from a json file.
language/compgen/csl/common/json_utils.py:22
Functionjson_file_to_dict
Constructs a dictionary from a json file.
language/compgen/nqg/model/parser/config_utils.py:22
Methodjson_repr
(self)
language/search_agents/muzero/types.py:57
Methodkey_annotation
(self)
language/diffqg/annotation.py:88
Functionkmeans
Perform K-means clustering. Args: observations: [n_observations, dim] data points. centroids: [n_clusters, dim] initial cluster centroids.
language/mentionmemory/modules/kmeans.py:125
Functionkmeans_step
Perform single K-means step. Standard K-means step. Assigns observations to nearest cluster, then updates cluster centroids as mean of assigned o
language/mentionmemory/modules/kmeans.py:75
Functionl2_distance
(x, y, normalize=False, reduce_axis=-1)
language/labs/consistent_zero_shot_nmt/models/losses.py:191
Functionlabels_of_top_ranked_predictions_in_batch
Applying tf.metrics.mean to this gives precision at 1. Args: labels: minibatch of dense 0/1 labels, shape [batch_size rows, num_classes] pr
language/nql/nql/util.py:414
Functionlast_dim_weighted_sum
Computes a weighted sum of the last dimension of `x`. Args: x: <float32>[..., x_dim] weight_name: Name of the weight variable to use we
language/boolq/utils/ops.py:57
Functionlayer_norm
Implements layer norm from [Ba et al. 2016] Layer Normalization. See eqn. 4 in (https://arxiv.org/pdf/1607.06450.pdf). Args: layer_inputs (t
language/common/utils/model_utils.py:29
Functionlayer_postprocess
Applies dropout, residual connection, and layer normalization. Based on layer postprocessing from "Attention Is All You Need": https://arxiv.org/
language/xsp/model/common_layers.py:132
Methodlegal_actions_mask
(self)
language/search_agents/muzero/state_tree.py:287
Methodlength
(x)
language/fruit/beam_pipelines.py:795
Functionlength_mapper
Creates a mapping function to augment a tf.data.Dataset with lengths. Suppose we have a `dataset` with outputs `str` with shape [sequence_length].
language/common/inputs/dataset_utils.py:26
Functionlinear_interpolation
(t, minimum, maximum)
language/labs/exemplar_decoding/utils/tensor_utils.py:25
Methodlinear_text_remapper
(type_name)
language/nql/demos/metaqa/metaqa.py:119
Methodlinear_text_remapper
(type_name)
language/nql/demos/nell995/nell995.py:142
Functionlinearize_full_table
Linearize full table with localized headers and return a string.
language/totto/baseline_preprocessing/preprocess_utils.py:90
Functionlinearize_subtable
Linearize the highlighted subtable and return a string of its contents.
language/totto/baseline_preprocessing/preprocess_utils.py:139
Functionlines_in_all
Enumerate lines in multiple files. Args: files: If specified, a file-like or array of file-like objects. lines: If specified, an array of s
language/nql/nql/io.py:45
Methodlist_items
See base class.
language/xsp/model/sequence_example_decoder.py:43
Methodload
(self, data_dir)
language/serene/text_matcher.py:133
Functionload_annotations
Load annotations.
language/decontext/decontext_util.py:83
Methodload_array
(suffix)
language/mentionmemory/tasks/memory_generation_task_test.py:270
Functionload_data
Loads train and test data, and possibly loads predictions.
language/compir/utils/io_utils.py:46
Functionload_db_checkpoint
Load weights for variables from checkpoint. Args: var_name: variable name checkpoint_dir: checkpoint dir dtype: data type cpu: if l
language/emql/util.py:215
Functionload_documents_from_shard
A helper function for load_documents_from_shards.
language/realm/retrieval.py:205
Functionload_documents_from_shards
Loads Documents from a sharded, GZIP-ed TFRecords file into a Python list. Uses multiple processes to perform IO in parallel. Args: shard_pa
language/realm/retrieval.py:213
Functionload_entities
Returns list of GeoEntity tuples for geobase entities.
language/compgen/nqg/tasks/geoquery/geobase_utils.py:101
Methodload_from_file
(cls, filename_prefix)
language/serene/tokenizers.py:53
Methodload_from_file
(cls, filename_prefix)
language/serene/tokenizers.py:68
Methodload_from_file
(cls, filename_prefix)
language/serene/tokenizers.py:151
Methodload_from_file
(cls, filename_prefix)
language/serene/tokenizers.py:204
Methodload_from_file
(cls, filename_prefix)
language/serene/preprocessing.py:322
Functionload_hellaswag
(data_dir)
language/conpono/evals/model_builder.py:100
Functionload_karpathy_splits
Load Karpathy COCO ids for train, val, and test.
language/capwap/utils/io_utils.py:146
Functionload_multi_dataset
Create TF dataset from different data sources. Args: datasets_config: a list of datasets to load. name_to_features: features to decode from
language/mentionmemory/utils/data_utils.py:281
Functionload_pickle
Load an object from a pickled file.
language/boolq/utils/py_utils.py:34
Functionload_predictions
Load predictions.
language/decontext/decontext_util.py:69
Functionload_ragged_matrix
Load sparse matrix from checkpoint.
language/labs/drkit/search_utils.py:165
Functionload_record
(filename)
language/conpono/evals/model_builder.py:368
Functionload_rules_from_file
Load list of TargetCfgRules from txt file.
language/compgen/csl/targets/target_grammar.py:71
Functionload_rules_from_file
Load list of TargetCfgRules from txt file.
language/compgen/nqg/model/parser/inference/targets/target_grammar.py:73
Functionload_scann_searcher
Load scann searcher from checkpoint.
language/orqa/utils/scann_utils.py:38
Functionload_sharded_array
Load and concatenate numpy arrays according to pattern. Args: pattern: pattern of array filenames to be loaded. stride: stride to traverse
language/mentionmemory/utils/data_utils.py:340
Functionload_sparse_matrix
Load sparse matrix from checkpoint.
language/labs/drkit/search_utils.py:183
Functionload_tests
Our tests end in `_test.py`, so need to override the test discovery.
language/mentionmemory/__init__.py:26
Functionload_weights
Load and deserialize weight dictionary.
language/mentionmemory/utils/checkpoint_utils.py:35
Methodload_weights
Load model weights and mention memory.
language/mentionmemory/encoders/mention_memory_encoder.py:496
Methodload_weights
Load model weights.
language/mentionmemory/tasks/memory_generation_task.py:227
Methodload_weights
Load model weights from file. We assume that `encoder_name` is specified in the config. We use corresponding class to load encoder weights.
language/mentionmemory/tasks/downstream_encoder_task.py:28
Methodload_weights
Load model weights from file. We assume that MentionEncoderTasks specify an encoder name as a class attribute, which we use to load encoder w
language/mentionmemory/tasks/mention_encoder_task.py:271
Functionlocal_invariant
A variant of a contract that can be specified inline via a `with` block.
language/canine/tensor_contracts.py:1279
Functionlocal_transformer_model
Fork of BERT's `transformer_model` that performs local attention. This attention is local in that attention happens only within each block (as de
language/canine/local_attention.py:200
Functionlog_debug_info
Logs `debug_info` for debugging purposes.
language/canine/tydiqa/debug.py:43
Functionlog_time
Utility to easily log the runtime of a passage of code with a message. EG. with log_time('hello there'): time.sleep(1) # prints: hello ther
language/serene/util.py:148
Functionloop_cond
Loop conditional that returns false to stop loop.
language/xsp/model/transformer.py:507
Methodloss_fn
(params)
language/mentionmemory/modules/batch_memory_attention_layer_test.py:172
Methodloss_fn
(params)
language/mentionmemory/modules/memory_attention_layer_test.py:332
Methodloss_fn
Model-specific loss function. See BaseTask.
language/mentionmemory/tasks/mention_memory_task.py:111
Methodloss_fn
Loss function used by Ultra Fine Entity Typing task. See BaseTask.
language/mentionmemory/tasks/ultra_fine_entity_typing_task.py:167
Methodloss_fn
Task-specific loss function. See BaseTask.
language/mentionmemory/tasks/eae_task.py:100
Methodloss_fn
Task-specific loss function. See BaseTask.
language/mentionmemory/tasks/embedding_based_entity_qa_task.py:73
Methodloss_fn
Model-specific loss function. See BaseTask.
language/mentionmemory/tasks/readtwice_task.py:125
Methodloss_fn
Model-specific loss function. See BaseTask.
language/mentionmemory/tasks/mauto_task.py:87
Methodloss_fn
Task-specific loss function. See BaseTask.
language/mentionmemory/tasks/example_task.py:61
Methodloss_fn
Loss function used by Relation Classifier task. See BaseTask.
language/mentionmemory/tasks/relation_classifier_task.py:128
Methodloss_fn
Model-specific loss function. See BaseTask. Classification loss is standard cross-entropy. Args: model_config: contains m
language/mentionmemory/tasks/text_classifier.py:91
Methodloss_fn
Model-specific loss function. Tasks are responsible for providing a loss function that produces a scalar loss and any relevant metrics.
language/mentionmemory/tasks/base_task.py:56
Methodloss_fn
Task-specific loss function. See BaseTask.
language/mentionmemory/tasks/mention_based_entity_qa_task.py:111
Methodloss_fn_multi_device
(mention_encodings, mention_batch_positions, mention_ids, mention_target_is_maske
language/mentionmemory/modules/mention_losses_test.py:462
Functionloss_fn_partial
(model_params)
language/mentionmemory/training/trainer.py:137
Methodlowercase
(self)
language/serene/preprocessing.py:288
Functionlowercase_op
Lowercase an arbitrarily sized string tensor.
language/boolq/utils/ops.py:119
Methodlr_near
(x)
language/nql/nql/nql_test.py:332
Functionmain
(_)
language/labs/exemplar_decoding/experiments/predict.py:153
Functionmain
(_)
language/labs/exemplar_decoding/experiments/train.py:152
Functionmain
(_)
language/labs/memory/run_models.py:307
Functionmain
(_)
language/labs/drkit/run_dualencoder_qa.py:1233
Functionmain
(_)
language/labs/drkit/run_dualencoder_lsf.py:2336
Functionmain
(_)
language/labs/drkit/run_multihop_follow.py:647
Functionmain
(_)
language/labs/drkit/evaluate.py:562
Functionmain
(_)
language/labs/drkit/wikidata/index.py:137
Functionmain
(_)
language/labs/drkit/wikidata/preprocessing/create_3hop_queries.py:52
Functionmain
(_)
language/labs/drkit/wikidata/preprocessing/add_negatives.py:50
Functionmain
(_)
language/labs/drkit/wikidata/preprocessing/create_follow_queries.py:52
Functionmain
(_)
language/labs/drkit/hotpotqa/index.py:154
Functionmain
(_)
language/labs/drkit/hotpotqa/answer_extractor.py:1252
Functionmain
(_)
language/labs/drkit/hotpotqa/demo.py:1213
Functionmain
(_)
language/labs/drkit/hotpotqa/preprocessing/create_tfrecords.py:554
Functionmain
(_)
language/labs/drkit/hotpotqa/preprocessing/convert_wikidata_to_mrqa.py:40
Functionmain
(_)
language/labs/drkit/hotpotqa/preprocessing/convert_hotpot_to_mrqa.py:64
Functionmain
(_)
language/labs/drkit/hotpotqa/preprocessing/link_questions.py:220
Functionmain
(_)
language/labs/drkit/hotpotqa/preprocessing/parse_wiki.py:105
Functionmain
(_)
language/labs/drkit/preprocessing/preprocess_qa.py:554
Functionmain
(_)
language/labs/drkit/metaqa/index.py:116
Functionmain
(_)
language/labs/drkit/metaqa/preprocessing/distantly_supervise.py:90
Functionmain
(_)
language/labs/drkit/metaqa/preprocessing/process_wiki.py:98
Functionmain
(_)
language/labs/drkit/metaqa/preprocessing/metaqa_preprocess.py:221
Functionmain
(argv)
language/labs/consistent_zero_shot_nmt/scripts/identify_overlap_iwslt17.py:81
← previousnext →4,401–4,500 of 6,154, ranked by callers