MCPcopy Create free account

hub / github.com/Marilynmontu/ChineseNER-pytorch / functions

Functions27 in github.com/Marilynmontu/ChineseNER-pytorch

↓ 3 callersFunctionload_data
(file_path, max_length, label_dic, vocab)
utils.py:45
↓ 2 callersMethod_viterbi_decode
Args: feats: size=(batch_size, seq_len, self.target_size+2) mask: size=(batch_size, seq_len) Returns:
model/crf.py:89
↓ 2 callersFunctionget_ner_BMES
(label_list)
utils.py:143
↓ 2 callersMethodget_output_score
(self, sentence, attention_mask=None)
model/bert_lstm_crf.py:39
↓ 2 callersFunctionload_vocab
Loads a vocabulary file into a dictionary.
utils.py:13
↓ 2 callersFunctionlog_sum_exp
Args: vec: size=(batch_size, vanishing_dim, hidden_dim) m_size: hidden_dim Returns: size=(batch_size, hidden_dim)
model/crf.py:8
↓ 2 callersFunctionrecover_label
(pred_var, gold_var, l2i_dic, i2l_dic)
utils.py:73
↓ 1 callersMethod__init__
(self, input_size, filters, kernel_size=3, num_block=4)
model/cnn.py:35
↓ 1 callersMethod_forward_alg
Do the forward algorithm to compute the partition function (batched). Args: feats: size=(batch_size, seq_len, self.targe
model/crf.py:43
↓ 1 callersMethod_score_sentence
Args: scores: size=(seq_len, batch_size, tag_size, tag_size) mask: size=(batch_size, seq_len) tags: size=
model/crf.py:173
↓ 1 callersFunctionevaluate
(medel, dev_loader)
train.py:46
↓ 1 callersFunctionget_ner_fmeasure
(golden_lists, predict_lists, label_type="BMES")
utils.py:92
↓ 1 callersFunctionload_file
(file_path)
utils.py:27
↓ 1 callersMethodneg_log_likelihood_loss
Args: feats: size=(batch_size, seq_len, tag_size) mask: size=(batch_size, seq_len) tags: size=(batch_size
model/crf.py:212
↓ 1 callersMethodrand_init_hidden
(self, batch_size)
model/bert_lstm_crf.py:29
↓ 1 callersFunctionreverse_style
(input_string)
utils.py:137
Method__init__
(self, text, label, input_id, label_id, input_mask)
utils.py:6
Method__init__
(self, features, eps=1e-6)
model/cnn.py:72
Method__init__
Args: target_size: int, target size use_cuda: bool, 是否使用gpu, default is True average_batch: bool, loss是否作
model/crf.py:25
Method__init__
(self, bert_config, tagset_size, embedding_dim, hidden_dim, rnn_layers, dropout_ratio, dropout1, use_cuda)
model/bert_lstm_crf.py:11
Methodforward
(self, embeddings, length)
model/cnn.py:64
Methodforward
(self, x)
model/cnn.py:78
Methodforward
(self, feats, mask=None)
model/crf.py:169
Methodforward
(self, sentence, masks)
model/bert_lstm_crf.py:56
Functionload_model
(path, model)
utils.py:193
Methodneg_log_likelihood_loss
(self, sentence, mask, tags)
model/bert_lstm_crf.py:61
Functionsave_model
(path, model, epoch)
utils.py:190