MCPcopy Create free account

hub / github.com/InsaneLife/dssm / functions

Functions205 in github.com/InsaneLife/dssm

↓ 1 callersMethodpredict
(self, test_data)
model/bert_classifier.py:137
↓ 1 callersFunctionpredict_bert
(file_="./results/input/test")
train.py:114
↓ 1 callersMethodpredict_embedding
(self, test_data)
model/siamese_network.py:364
↓ 1 callersFunctionpredict_siamese
(file_='./results/')
train.py:43
↓ 1 callersFunctionpredict_siamese_bert
(file_="./results/input/test")
train.py:77
↓ 1 callersFunctionpull_batch
(data_map, batch_id)
dssm_rnn.py:161
↓ 1 callersFunctionpull_batch
(data_map, batch_id)
dssm.py:207
↓ 1 callersMethodrun_epoch
(self, epoch, data_train, data_val)
model/siamese_network.py:215
↓ 1 callersMethodsave_session
(self)
model/base_model.py:165
↓ 1 callersFunctionsiamese_bert_sentence_embedding
(file_="./results/input/test.single")
train.py:131
↓ 1 callersMethodto_dict
Serializes this instance to a Python dictionary.
model/bert/modeling_v1.py:95
↓ 1 callersMethodto_dict
Serializes this instance to a Python dictionary.
model/bert/modeling.py:95
↓ 1 callersMethodtokenize
(self, text)
model/bert/tokenization.py:113
↓ 1 callersFunctiontrain_bert
()
train.py:95
↓ 1 callersFunctiontrain_siamese
()
train.py:29
↓ 1 callersFunctiontrain_siamese_bert
()
train.py:58
↓ 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.
model/bert/modeling_v1.py:732
↓ 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.
model/bert/modeling.py:724
Method__del__
(self)
model/base_model.py:140
Method__init__
(self)
config.py:22
Method__init__
(self, meta_file, max_len, allow_unk=0, unk="$UNK$", pad="$PAD$",)
data_input.py:21
Method__init__
(self, cfg, is_training=1)
model/siamese_network.py:234
Method__init__
(self, cfg, is_training=1)
model/base_model.py:130
Method__init__
(self, cfg, is_training=1)
model/bert_classifier.py:53
Method__init__
Constructs BertConfig. Args: vocab_size: Vocabulary size of `inputs_ids` in `BertModel`. hidden_size: Size of the encoder layers an
model/bert/modeling_v1.py:33
Method__init__
Constructor for BertModel. Args: config: `BertConfig` instance. is_training: bool. rue for training model, false for eval model. Co
model/bert/modeling_v1.py:124
Method__init__
(self, vocab_file, do_lower_case=True)
model/bert/tokenization.py:108
Method__init__
(self, vocab_file, do_lower_case=True)
model/bert/tokenization.py:128
Method__init__
Constructs a BasicTokenizer. Args: do_lower_case: Whether to lower case the input.
model/bert/tokenization.py:149
Method__init__
(self, vocab, unk_token="[UNK]", max_input_chars_per_word=100)
model/bert/tokenization.py:264
Method__init__
Constructs a AdamWeightDecayOptimizer.
model/bert/optimization.py:87
Method__init__
Constructs BertConfig. Args: vocab_size: Vocabulary size of `inputs_ids` in `BertModel`. hidden_size: Size of the encoder layers an
model/bert/modeling.py:33
Method__init__
Constructor for BertModel. Args: config: `BertConfig` instance. is_training: bool. rue for training model, false for eval model. Co
model/bert/modeling.py:124
Method__len__
(self)
data_input.py:149
Method_add_word_embedding_matrix
(self,)
model/base_model.py:290
Method_bigru
(self, input_emb, input_length, hidden_size, variable_scope="BiGRU")
model/base_model.py:398
Method_bilstm
(self, input_emb, input_length, hidden_size, variable_scope="BilSTM")
model/base_model.py:406
Method_concat_lstm
input_emb: [batch_size, nstep, hidden_size] extra_emb: [batch_size, hidden_size]
model/base_model.py:248
Method_dropout
(self, input_emb, ratio=None)
model/base_model.py:390
Method_get_triplet_mask
得到一个3D的mask [a, p, n], 对应triplet(a, p, n)是valid的位置是True ---------------------------------- Args: labels: 对应训练数据的l
model/base_model.py:55
Method_iterable_dilated_cnn
:param embeddings: [batch_size, steps, embedding_dim] :return:
model/base_model.py:416
Method_pairwise_distance
计算两两embedding的距离 ------------------------------------------ Args: embedding: 特征向量, 大小(batch_size, vector_size)
model/base_model.py:28
Method_state_lstm
(self, input_emb, input_length, initial_state, hidden_size, variable_scope="StateLSTM")
model/base_model.py:231
Method_train_op
(self)
model/base_model.py:271
Method_transform_intent2ont_hot
(self, words, padding=0)
data_input.py:81
Function_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
util.py:47
Methodadd_bert_layer
(self, use_bert_pre=1)
model/base_model.py:304
Methodapply_dropout
()
model/bert/modeling_v1.py:157
Methodbatch_all_triplet_loss
triplet loss of a batch ------------------------------- Args: labels: 标签数据,shape = (batch_size,)
model/base_model.py:88
Functionbatch_normalization
Batch normalization on convolutional maps. Ref.: http://stackoverflow.com/questions/33949786/how-could-i-use-batch-normalization-in-tensorflo
multi_view_dssm_v3.py:62
Methodbuild
(self)
model/siamese_network.py:295
Methodbuild
(self)
model/bert_classifier.py:86
Functioncontrastive_loss
(y, d, batch_size)
dssm.py:99
Methodcontrastive_loss
(self, model1, model2, y, margin=0.5)
model/siamese_network.py:271
Functionconvert_to_unicode
Converts `text` to Unicode (if it's not already), assuming utf-8 input.
util.py:15
Methodconvert_tokens_to_ids
(self, tokens)
model/bert/tokenization.py:121
Methodconvert_tokens_to_ids
(self, tokens)
model/bert/tokenization.py:142
Methodcos_sim
(self, query_rnn_output, doc_rnn_output)
model/siamese_network.py:99
Functioncosine_similarity
(a, b)
model/siamese_network.py:32
Functioncosine_similarity
(a, b)
model/bert_classifier.py:31
Functioncreate_optimizer
Creates an optimizer training op.
model/bert/optimization.py:25
Methodfrom_json_file
Constructs a `BertConfig` from a json file of parameters.
model/bert/modeling_v1.py:89
Functiongelu
Gaussian Error Linear Unit. This is a smoother version of the RELU. Original paper: https://arxiv.org/abs/1606.08415 Args: input_tensor:
model/bert/modeling_v1.py:263
Functiongelu
Gaussian Error Linear Unit. This is a smoother version of the RELU. Original paper: https://arxiv.org/abs/1606.08415 Args: input_tensor:
model/bert/modeling.py:255
Functiongen_word_set
(file_path, out_path='./data/words.txt')
data_input.py:171
Methodget_all_encoder_layers
(self)
model/bert/modeling_v1.py:246
Methodget_all_encoder_layers
(self)
model/bert/modeling.py:238
Functionget_assignment_map_from_checkpoint
Compute the union of the current variables and checkpoint variables.
model/bert/modeling_v1.py:310
Functionget_assignment_map_from_checkpoint
Compute the union of the current variables and checkpoint variables.
model/bert/modeling.py:302
Functionget_data
gen datasets, convert word into word ids. :param file_path: :return: [[query, pos sample, 4 neg sample]], shape = [n, 6]
data_input.py:215
Functionget_data_bow
gen datasets, convert word into word ids. :param file_path: :return: [[query, prefix, label]], shape = [n, 3]
data_input.py:269
Functionget_data_siamese_rnn
gen datasets, convert word into word ids. :param file_path: :return: [[query, pos sample, 4 neg sample]], shape = [n, 6]
data_input.py:250
Methodget_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]
model/bert/modeling_v1.py:249
Methodget_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]
model/bert/modeling.py:241
Methodget_embedding_table
(self)
model/bert/modeling_v1.py:259
Methodget_embedding_table
(self)
model/bert/modeling.py:251
Functionget_lcqmc_bert
使用LCQMC数据集,并将每个query其转为word_id,
data_input.py:337
Methodget_params_count
()
model/base_model.py:177
Methodget_pooled_output
(self)
model/bert/modeling_v1.py:235
Methodget_sequence_output
Gets final hidden layer of encoder. Returns: float Tensor of shape [batch_size, seq_length, hidden_size] corresponding to the final
model/bert/modeling_v1.py:238
Functionget_test_bert
(file_:str, vocab:Vocabulary, is_merge=0)
data_input.py:363
Functionget_test_bert_single
(file_:str, vocab:Vocabulary, is_merge=0)
data_input.py:384
Functionhello_world
(q1, q2)
flask_server.py:29
Methodinit_from_pre_dir
(self, pre_dir)
model/base_model.py:170
Methodlabel_smoothing
From the paper: "... employed label smoothing of epsilon = 0.1. This hurts perplexity, as the model learns to be more unsure, but imp
model/base_model.py:497
Functionmean_var_with_update
()
multi_view_dssm_v3.py:82
Functionmean_var_with_update
(ema, fc_mean, fc_var)
dssm.py:48
Methodnot_apply_dropout
()
model/bert/modeling_v1.py:153
Functionprintable_text
Returns text encoded in a way suitable for print or `tf.logging`.
model/bert/tokenization.py:47
Functionpull_all
(query_in, doc_positive_in, doc_negative_in)
dssm.py:187
Methodrun_epoch
(self, epoch, d_train, d_val)
model/siamese_network.py:321
Methodrun_epoch
(self, epoch, d_train, d_val)
model/bert_classifier.py:106
Functionsiamese_loss
(out1,out2,y,Q=5)
model/siamese_network.py:40
Methodsiamese_loss
(self, out1, out2, y, Q=5.0)
model/siamese_network.py:263
Methodto_json_string
Serializes this instance to a JSON string.
model/bert/modeling_v1.py:100
Methodto_json_string
Serializes this instance to a JSON string.
model/bert/modeling.py:100
Methodtokenize
(self, text)
model/bert/tokenization.py:134
Methodtokenize
Tokenizes a piece of text.
model/bert/tokenization.py:157
Methodtokenize
Tokenizes a piece of text into its word pieces. This uses a greedy longest-match-first algorithm to perform tokenization using the
model/bert/tokenization.py:269
Methodtransform
(self, seq_list, is_bert=0)
data_input.py:143
← previousnext →101–200 of 205, ranked by callers