MCPcopy Create free account

hub / github.com/ShannonAI/CorefQA / functions

Functions207 in github.com/ShannonAI/CorefQA

↓ 1 callersFunctionload_models
(bert_config_path, )
run/transform_spanbert_pytorch_to_tf.py:30
↓ 1 callersFunctionload_vocab
Loads a vocabulary file into a dictionary.
bert/tokenization.py:121
↓ 1 callersFunctionmain
()
run/build_dataset_to_tfrecord.py:428
↓ 1 callersFunctionmain
(bert_config_path, bert_ckpt_path, pytorch_init_checkpoint, output_tf_dir)
run/transform_spanbert_pytorch_to_tf.py:49
↓ 1 callersMethodmarginal_likelihood_loss
Desc: marginal likelihood of gold antecedent spans form coreference cluster Args: antecedent_scores: [k, c+1
models/corefqa.py:374
↓ 1 callersFunctionmention_proposal_prediction
current_doc_result: "total_loss": total_loss, "start_scores": start_scores, "start_gold": gold_starts, "end_gold
utils/metrics.py:11
↓ 1 callersFunctionmkdirs
(path)
utils/util.py:73
↓ 1 callersFunctionmodel_fn
(config)
tests/model_fn.py:13
↓ 1 callersFunctionmodel_fn_builder
Returns `model_fn` closure for TPUEstimator.
run/run_squad.py:591
↓ 1 callersFunctionnormalize_word
(word, language)
run/build_dataset_to_tfrecord.py:242
↓ 1 callersFunctionofficial_conll_eval
(gold_path, predicted_path, metric, official_stdout=False)
data_utils/conll.py:88
↓ 1 callersFunctionoutput_conll
(input_file, output_file, predictions, subtoken_map)
data_utils/conll.py:32
↓ 1 callersFunctionparse_args
()
run/build_dataset_to_tfrecord.py:403
↓ 1 callersFunctionparse_args
()
run/transform_spanbert_pytorch_to_tf.py:73
↓ 1 callersFunctionparse_document
get basic information from one document annotation. :param document: :param language: english, chinese or arabic :return:
run/build_dataset_to_tfrecord.py:209
↓ 1 callersFunctionphi4
(c1, c2)
utils/metrics.py:155
↓ 1 callersFunctionprepare_train_dataset
(input_file, output_data_dir, output_filename, window_size, num_window, tokenizer=None, vocab_file=None,
run/build_dataset_to_tfrecord.py:87
↓ 1 callersMethodprocess_feature
Write a InputFeature to the TFRecordWriter as a tf.train.Example.
run/run_squad.py:1068
↓ 1 callersFunctionread_conll_file
(conll_file_path)
run/build_dataset_to_tfrecord.py:194
↓ 1 callersMethodto_dict
Serializes this instance to a Python dictionary.
bert/modeling.py:97
↓ 1 callersFunctionto_tf_var_name
(name: str)
utils/load_pytorch_to_tf.py:39
↓ 1 callersMethodtokenize
Tokenizes a piece of text.
bert/tokenization.py:196
↓ 1 callersFunctiontokenize_document
tokenize into sub tokens :param doc_info: :param tokenizer: max_doc_length: pad to max_doc_length :return:
run/build_dataset_to_tfrecord.py:292
↓ 1 callersMethodtransform_overlap_windows_to_original_doc
Desc: hidden_size should be equal to embeddding_size. Args: doc_overlap_window_embs: (num_window, window_siz
models/mention_proposal.py:211
↓ 1 callersFunctiontransformer_model
Multi-headed, multi-layer Transformer from "Attention is All You Need". This is almost an exact implementation of the original Transformer encode
bert/modeling.py:759
↓ 1 callersFunctionvalidate_flags_or_throw
Validate the input FLAGS or throw an exception.
run/run_squad.py:1098
↓ 1 callersFunctionwrite_instance_to_example_file
(writer, instance, doc_key, window_size=64, num_window=5, max_num_mention=20, max_num_cluster=30, pad_idx=
run/build_dataset_to_tfrecord.py:124
↓ 1 callersFunctionwrite_predictions
Write final predictions to the json file and log-odds of null if needed.
run/run_squad.py:742
Method__init__
r"""Construct a new Rectified Adam optimizer. Args: learning_rate: A Tensor or a floating point value. The learning rate.
utils/radam.py:20
Method__init__
(self)
utils/metrics.py:55
Method__init__
(self, metric, beta=1)
utils/metrics.py:76
Method__init__
(self, vocab_file, do_lower_case=True)
bert/tokenization.py:164
Method__init__
Constructs a BasicTokenizer. Args: do_lower_case: Whether to lower case the input.
bert/tokenization.py:188
Method__init__
(self, vocab, unk_token="[UNK]", max_input_chars_per_word=200)
bert/tokenization.py:303
Method__init__
Constructs a AdamWeightDecayOptimizer.
bert/optimization.py:90
Method__init__
Constructs BertConfig. Args: vocab_size: Vocabulary size of `inputs_ids` in `BertModel`. hidden_size: Size of the encoder
bert/modeling.py:34
Method__init__
Constructor for BertModel. Args: config: `BertConfig` instance. is_training: bool. rue for training model, false for eval
bert/modeling.py:131
Method__init__
(self, config)
models/corefqa.py:18
Method__init__
(self, config)
models/mention_proposal.py:24
Method__init__
(self, tf_flags, output_dir, model_sign="model")
data_utils/config_utils.py:18
Method__init__
(self, qas_id, question_text, doc_tokens, orig_ans
run/run_squad.py:164
Method__init__
(self, unique_id, example_index, doc_span_index, t
run/run_squad.py:201
Method__init__
(self, filename, is_training)
run/run_squad.py:1062
Method__str__
(self)
run/run_squad.py:180
Method_apply_dense
(self, grad, var)
utils/radam.py:144
Method_apply_sparse
(self, grad, var)
utils/radam.py:200
Method_create_slots
(self, var_list)
utils/radam.py:68
Method_finish
(self, update_ops, name_scope)
utils/radam.py:220
Method_prepare
(self)
utils/radam.py:83
Method_resource_apply_dense
(self, grad, var)
utils/radam.py:147
Method_resource_apply_sparse
(self, grad, var, indices)
utils/radam.py:211
Method_resource_scatter_add
(self, x, i, v)
utils/radam.py:215
Functionappend_feature
(feature)
run/run_squad.py:1227
Functionb_cubed
(clusters, mention_to_gold)
utils/metrics.py:118
Methodbackward_qa_mention_linking
(i, batch_qa_input_ids, batch_qa_input_mask, batch_qa_input_token_type_mask, batch_qa_mention_sta
models/corefqa.py:255
Functionbatch_gather
(emb, indices)
utils/util.py:114
Functionceafe
(clusters, gold_clusters)
utils/metrics.py:159
Functioncheckout_clusters
(doc_info)
run/build_dataset_to_tfrecord.py:286
Functionconvert_ids_to_tokens
(inv_vocab, ids)
bert/tokenization.py:148
Methodconvert_ids_to_tokens
(self, ids)
bert/tokenization.py:181
Functionconvert_tokens_to_ids
(vocab, tokens)
bert/tokenization.py:144
Functioncopy_checkpoint
(source, target)
utils/util.py:54
Functioncorefqa_model_fn
The `model_fn` for TPUEstimator.
func_builders/model_fn_builder.py:125
Methodcreate_int_feature
(values)
run/run_squad.py:1072
Functioncreate_optimizer
Creates an optimizer training op.
bert/optimization.py:25
Functionevaluate_conll
(gold_path, predictions, subtoken_maps, official_stdout=False)
data_utils/conll.py:109
Functionevaluate_documents
(documents, metric, beta=1)
utils/metrics.py:111
Functionffnn
(inputs, num_hidden_layers, hidden_size, output_size, dropout, output_weights_initializer=tf.truncate
utils/util.py:100
Functionflatten
(l)
utils/util.py:63
Methodforward_qa_mention_linking
(i, batch_qa_input_ids, batch_qa_input_mask, batch_qa_input_token_type_mask)
models/corefqa.py:144
Functiongelu
Gaussian Error Linear Unit. This is a smoother version of the RELU. Original paper: https://arxiv.org/abs/1606.08415 Args: input_t
bert/modeling.py:269
Methodget_all_encoder_layers
(self)
bert/modeling.py:251
Functionget_assignment_map_from_checkpoint
Compute the union of the current variables and checkpoint variables.
bert/modeling.py:322
Methodget_counts
(self)
utils/metrics.py:107
Methodget_embedding_output
Gets output of the embedding lookup (i.e., input to the transformer). Returns: float Tensor of shape [batch_size, seq_length, hidde
bert/modeling.py:254
Methodget_embedding_table
(self)
bert/modeling.py:265
Functionget_model
(config, model_sign="corefqa")
utils/util.py:20
Methodget_pooled_output
(self)
bert/modeling.py:239
Methodget_prf
(self)
utils/metrics.py:104
Methodget_shape
Desc: return the size of input x in DIM.
models/mention_proposal.py:260
Functioninitialize_from_env
(eval_test=False, config_params="train_spanbert_base", config_file="experiments_tinybert.conf", use_tpu=False,
utils/util.py:27
Functioninput_fn
The actual input function.
run/run_squad.py:716
Functioninput_fn_from_tfrecord
The actual input function.
func_builders/input_fn_builder.py:43
Functionlea
(clusters, mention_to_gold)
utils/metrics.py:170
Functionload_char_dict
(char_vocab_path)
utils/util.py:82
Functionload_from_pytorch_checkpoint
(checkpoint, assignment_map)
utils/load_pytorch_to_tf.py:53
Functionmain
(_)
run/run_squad.py:1127
Functionmain
(_)
run/run_mention_proposal.py:79
Functionmain
(_)
run/run_corefqa.py:85
Functionmake_summary
(value_dict)
utils/util.py:59
Functionmaybe_divide
(x, y)
utils/util.py:91
Functionmention_proposal_fn
()
tests/model_fn.py:15
Functionmention_proposal_model_fn
The `model_fn` for TPUEstimator.
func_builders/model_fn_builder.py:20
Functionmetric_fn
(start_scores, end_scores, span_scores, gold_span_label)
func_builders/model_fn_builder.py:81
Functionmodel_fn
The `model_fn` for TPUEstimator.
run/run_squad.py:596
Functionmuc
(clusters, mention_to_gold)
utils/metrics.py:140
Functionprint_vars
(pytorch_ckpt, tf_ckpt)
utils/load_pytorch_to_tf.py:72
Functionprintable_text
Returns text encoded in a way suitable for print or `tf.logging`.
bert/tokenization.py:98
Methodscatter_span_sequence_labels
Desc: transform the mention (start, end) position pairs to a span matrix gold_span_sequence_labels. matrix[i][j]
models/corefqa.py:511
Functionset_gpus
(*gpus)
utils/util.py:67
← previousnext →101–200 of 207, ranked by callers