MCPcopy Create free account

hub / github.com/HuiResearch/cail2019_track2 / functions

Functions274 in github.com/HuiResearch/cail2019_track2

↓ 1 callersMethodcreate_model
(self)
bert/modeling_test.py:71
↓ 1 callersFunctioncreate_tokenizer_from_hub_module
Get the vocab file and casing info from the Hub module.
bert/run_classifier_with_tfhub.py:146
↓ 1 callersFunctioncreate_training_instances
Create `TrainingInstance`s from raw text.
createPretrainData.py:189
↓ 1 callersFunctioncreate_training_instances
Create `TrainingInstance`s from raw text.
bert/create_pretraining_data.py:175
↓ 1 callersFunctionembedding_lookup
Looks up words embeddings for id tensor. Args: input_ids: int32 Tensor of shape [batch_size, seq_length] containing word ids. vocab_s
bert/modeling.py:380
↓ 1 callersFunctionembedding_postprocessor
Performs various post-processing on a word embedding tensor. Args: input_tensor: float Tensor of shape [batch_size, seq_length, embedding
bert/modeling.py:428
↓ 1 callersMethodflatten_recursive
Flattens (potentially nested) a tuple/dictionary/list to a list.
bert/modeling_test.py:257
↓ 1 callersFunctionfocal_loss
r"""Compute focal loss for predictions. Multi-labels Focal loss formula: FL = -alpha * (z-p)^gamma * log(p) -(1-alpha) * p^gamma *
train.py:563
↓ 1 callersMethodfrom_dict
Constructs a `BertConfig` from a Python dictionary of parameters.
bert/modeling.py:83
↓ 1 callersFunctiongather_indexes
Gathers the vectors at the specific positions over a minibatch.
run_pretrain.py:318
↓ 1 callersFunctiongather_indexes
Gathers the vectors at the specific positions over a minibatch.
bert/run_pretraining.py:308
↓ 1 callersMethodgen_new_result
(self, result, truth, label)
utils/evaluate.py:30
↓ 1 callersMethodgen_score
(self, arr)
utils/evaluate.py:77
↓ 1 callersMethodgetAllResult
一次性预测所有句子
utils/predict.py:130
↓ 1 callersFunctiongetLab
(probs, id2label, threshold)
search_threshold.py:14
↓ 1 callersFunctiongetNumClasses
()
train.py:171
↓ 1 callersFunctiongetPreLab
(array, id2label, threshold)
search_threshold.py:21
↓ 1 callersMethodgetProbs
(self, sentences)
utils/predict.py:208
↓ 1 callersFunctionget_activation
Maps a string to a Python function, e.g., "relu" => `tf.nn.relu`. Args: activation_string: String name of the activation function. Returns:
bert/modeling.py:280
↓ 1 callersMethodget_dev_examples
Gets a collection of `InputExample`s for the dev set.
train.py:238
↓ 1 callersMethodget_embedding_output
Gets output of the embedding lookup (i.e., input to the transformer). Returns: float Tensor of shape [batch_size, seq_length, hidden_size]
bert/modeling.py:249
↓ 1 callersFunctionget_final_text
Project the tokenized prediction back to the original text.
bert/run_squad.py:927
↓ 1 callersMethodget_labels
Gets the list of labels for this data set.
train.py:246
↓ 1 callersFunctionget_masked_lm_output
Get loss and log probs for the masked LM.
run_pretrain.py:250
↓ 1 callersFunctionget_masked_lm_output
Get loss and log probs for the masked LM.
bert/run_pretraining.py:240
↓ 1 callersFunctionget_next_sentence_output
Get loss and log probs for the next sentence prediction.
run_pretrain.py:295
↓ 1 callersFunctionget_next_sentence_output
Get loss and log probs for the next sentence prediction.
bert/run_pretraining.py:285
↓ 1 callersMethodget_test_examples
Gets a collection of `InputExample`s for prediction.
train.py:242
↓ 1 callersMethodget_train_examples
Gets a collection of `InputExample`s for the train set.
train.py:234
↓ 1 callersMethodget_unreachable_ops
Finds all of the tensors in graph that are unreachable from outputs.
bert/modeling_test.py:194
↓ 1 callersFunctioninput_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
bert/extract_features.py:100
↓ 1 callersFunctionis_whitespace
(c)
bert/run_squad.py:232
↓ 1 callersFunctionlayer_norm_and_dropout
Runs layer normalization followed by dropout.
bert/modeling.py:368
↓ 1 callersFunctionload_file
(filename)
evaluation.py:42
↓ 1 callersFunctionload_file
(filename)
search_threshold.py:27
↓ 1 callersFunctionload_vocab
Loads a vocabulary file into a dictionary.
bert/tokenization.py:121
↓ 1 callersFunctionmodel_fn_builder
Returns `model_fn` closure for TPUEstimator.
train.py:632
↓ 1 callersFunctionmodel_fn_builder
Returns `model_fn` closure for TPUEstimator.
run_pretrain.py:119
↓ 1 callersFunctionmodel_fn_builder
Returns `model_fn` closure for TPUEstimator.
bert/run_squad.py:590
↓ 1 callersFunctionmodel_fn_builder
Returns `model_fn` closure for TPUEstimator.
bert/run_classifier_with_tfhub.py:87
↓ 1 callersFunctionmodel_fn_builder
Returns `model_fn` closure for TPUEstimator.
bert/run_pretraining.py:109
↓ 1 callersFunctionmodel_fn_builder
Returns `model_fn` closure for TPUEstimator.
bert/run_classifier.py:619
↓ 1 callersFunctionmodel_fn_builder
Returns `model_fn` closure for TPUEstimator.
bert/extract_features.py:148
↓ 1 callersFunctionmulti_label_hot
(predictions, threshold=0.5)
train.py:701
↓ 1 callersMethodprocess_feature
Write a InputFeature to the TFRecordWriter as a tf.train.Example.
bert/run_squad.py:1067
↓ 1 callersFunctionre_match
(text, feature)
evaluation.py:26
↓ 1 callersFunctionread_examples
Read a list of `InputExample`s from an input file.
bert/extract_features.py:319
↓ 1 callersMethodrematch
(self, arrays)
utils/predict.py:142
↓ 1 callersMethodrun_tester
(self, tester)
bert/modeling_test.py:135
↓ 1 callersFunctionsearchThreshold
用划分好的测试集取搜索最优的阈值,精度0.1,再低会过拟合,最好使用交叉验证来做 由于交叉验证bert代价很大,就没做 :param domain: 数据集类别,divorce、labor、loan :param model_pb: pb模型文件 :para
search_threshold.py:39
↓ 1 callersMethodtest
(self, truth_label, pre_label)
utils/evaluate.py:97
↓ 1 callersMethodto_dict
Serializes this instance to a Python dictionary.
bert/modeling.py:97
↓ 1 callersMethodto_json_string
Serializes this instance to a JSON string.
bert/modeling.py:102
↓ 1 callersFunctiontransformer_model
Multi-headed, multi-layer Transformer from "Attention is All You Need". This is almost an exact implementation of the original Transformer encoder.
bert/modeling.py:754
↓ 1 callersFunctiontruncate_seq_pair
Truncates a pair of sequences to a maximum sequence length.
createPretrainData.py:405
↓ 1 callersFunctiontruncate_seq_pair
Truncates a pair of sequences to a maximum sequence length.
bert/create_pretraining_data.py:391
↓ 1 callersFunctionvalidate_flags_or_throw
Validate the input FLAGS or throw an exception.
bert/run_squad.py:1097
↓ 1 callersFunctionwork
(task)
genPretrainData.py:15
↓ 1 callersFunctionwrite_instance_to_example_files
Create TF example files from `TrainingInstance`s.
createPretrainData.py:106
↓ 1 callersFunctionwrite_instance_to_example_files
Create TF example files from `TrainingInstance`s.
bert/create_pretraining_data.py:92
↓ 1 callersFunctionwrite_predictions
Write final predictions to the json file and log-odds of null if needed.
bert/run_squad.py:741
Method__init__
Constructs a InputExample. Args: guid: Unique id for the example. text_a: string. The untokenized text of the first seque
train.py:184
Method__init__
(self, input_ids, input_mask, segment_ids,
train.py:218
Method__init__
(self, tokens, segment_ids, masked_lm_positions, masked_lm_labels, is_random_next)
createPretrainData.py:81
Method__init__
(self, input_ids, input_mask, segment_ids, label_i
utils/predict.py:16
Method__init__
:param task: 任务类型,包括divorce,labor,loan :param pb_model: pb模型文件名 :param tagDir: 任务标签tags文件 :param threshold: 多标签分类的阈值列
utils/predict.py:76
Method__init__
:param embedding: bert生成的embedding :param context_dim: lstm隐藏层维度 :param hidden_dim:全连接层隐藏层维度 :param dropout_keep_prob
utils/models.py:4
Method__init__
:param embedding: bert生成的embedding :param context_dim: lstm隐藏层维度 :param hidden_dim:全连接层隐藏层维度 :param dropout_keep_prob
utils/models.py:44
Method__init__
(self, tag_path)
utils/evaluate.py:8
Method__init__
(self, qas_id, question_text, doc_tokens, orig_ans
bert/run_squad.py:163
Method__init__
(self, unique_id, example_index, doc_span_index, t
bert/run_squad.py:200
Method__init__
(self, filename, is_training)
bert/run_squad.py:1061
Method__init__
(self, parent, batch_size=13, seq_length=7,
bert/modeling_test.py:33
Method__init__
(self, tokens, segment_ids, masked_lm_positions, masked_lm_labels, is_random_next)
bert/create_pretraining_data.py:67
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 InputExample. Args: guid: Unique id for the example. text_a: string. The untokenized text of the first sequence. For sin
bert/run_classifier.py:130
Method__init__
(self, input_ids, input_mask, segment_ids, label_i
bert/run_classifier.py:164
Method__init__
(self)
bert/run_classifier.py:210
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 layers and
bert/modeling.py:34
Method__init__
Constructor for BertModel. Args: config: `BertConfig` instance. is_training: bool. true for training model, false for eval model. Con
bert/modeling.py:131
Method__init__
(self, unique_id, text_a, text_b)
bert/extract_features.py:83
Method__init__
(self, unique_id, tokens, input_ids, input_mask, input_type_ids)
bert/extract_features.py:92
Method__repr__
(self)
createPretrainData.py:102
Method__repr__
(self)
bert/create_pretraining_data.py:88
Method__str__
(self)
bert/run_squad.py:179
Functionadd_
(arr1, arr2)
evaluation.py:20
Functionappend_feature
(feature)
bert/run_squad.py:1226
Functionconvert_examples_to_features
Convert a set of `InputExample`s to a list of `InputFeatures`.
train.py:792
Functionconvert_examples_to_features
Convert a set of `InputExample`s to a list of `InputFeatures`.
bert/run_classifier.py:767
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
Methodcreate_int_feature
(values)
bert/run_squad.py:1071
Functioncreate_model_original
Creates a classification model.
train.py:519
Functioncreate_optimizer
Creates an optimizer training op.
bert/optimization.py:25
Methodformat_result
(result)
utils/evaluate.py:19
Functiongelu
Gaussian Error Linear Unit. This is a smoother version of the RELU. Original paper: https://arxiv.org/abs/1606.08415 Args: x: float Tensor
bert/modeling.py:264
← previousnext →101–200 of 274, ranked by callers