MCPcopy Create free account

hub / github.com/MorvanZhou/NLP-Tutorials / functions

Functions287 in github.com/MorvanZhou/NLP-Tutorials

↓ 35 callersMethodidx2str
(self, idx)
utils.py:45
↓ 20 callersMethodidx2str
(self,idx)
pytorch/utils.py:47
↓ 16 callersMethodsample
(self, n)
utils.py:196
↓ 10 callersMethodcall
(self, xz, training, mask)
transformer.py:91
↓ 8 callersMethod__init__
(self, padding_idx=0)
simple_realize/transformer.py:227
↓ 8 callersMethodbuild
(self, input_shape)
simple_realize/transformer.py:92
↓ 7 callersMethod__init__
(self, n_head, model_dim, drop_rate, n_layer)
transformer.py:87
↓ 7 callersMethod__init__
(self, n_head, emb_dim, drop_rate, n_layer)
pytorch/transformer.py:100
↓ 6 callersMethodsample
(self, n=64)
utils.py:39
↓ 4 callersMethod_pad_mask
(self, seqs)
simple_realize/transformer.py:195
↓ 4 callersMethodcall
(self, seqs, segs, training=False)
GPT.py:47
↓ 4 callersFunctionprocess_w2v_data
(corpus, skip_window=2, method="skip_gram")
utils.py:206
↓ 3 callersFunction_get_loss_mask
(len_arange, seq, pad_id)
BERT.py:41
↓ 3 callersFunction_get_loss_mask
(len_arange, seq, pad_id)
pytorch/BERT.py:40
↓ 3 callersMethod_pad_mask
(self, seqs)
transformer.py:180
↓ 3 callersMethod_pad_mask
(self, seqs)
pytorch/transformer.py:193
↓ 3 callersMethodplot
(self, data)
simple_realize/CBOW.py:63
↓ 3 callersMethodsplit_heads
(self, x)
transformer.py:41
↓ 3 callersMethodsplit_heads
(self, x)
pytorch/transformer.py:50
↓ 2 callersMethod__init__
(self, enc_v_dim, dec_v_dim, emb_dim, units, max_pred_len, start_token, end_token)
simple_realize/seq2seq_attention.py:44
↓ 2 callersMethod_look_ahead_mask
(self, seqs)
transformer.py:184
↓ 2 callersMethod_look_ahead_mask
(self, seqs)
simple_realize/transformer.py:199
↓ 2 callersMethod_look_ahead_mask
(self,seqs)
pytorch/transformer.py:198
↓ 2 callersMethod_pad_bool
(self, seqs)
transformer.py:177
↓ 2 callersMethod_pad_bool
(self, seqs)
pytorch/transformer.py:190
↓ 2 callersFunction_process_mrpc
(dir="./MRPC", rows=None)
utils.py:89
↓ 2 callersFunction_process_mrpc
(dir="./MRPC", rows=None)
pytorch/utils.py:141
↓ 2 callersMethodcall
(self, seqs)
ELMo.py:32
↓ 2 callersFunctioncosine_similarity
(q, _tf_idf)
tf_idf.py:78
↓ 2 callersMethodencode
(self, x)
seq2seq.py:47
↓ 2 callersMethodencode
(self, x)
cnn-lm.py:52
↓ 2 callersMethodencode
(self,x)
pytorch/seq2seq_attention.py:30
↓ 2 callersMethodencode
(self,x)
pytorch/cnn_lm.py:36
↓ 2 callersMethodencode
(self,x)
pytorch/seq2seq.py:33
↓ 2 callersFunctionexport_attention
(model, data, name="gpt")
GPT.py:117
↓ 2 callersMethodinference
(self, x, return_align=False)
seq2seq_attention.py:72
↓ 2 callersFunctionload_data
(data,size)
simple_realize/transformer.py:262
↓ 2 callersFunctionmaybe_download_mrpc
(save_dir="./MRPC/", proxy=None)
utils.py:65
↓ 2 callersFunctionmaybe_download_mrpc
(save_dir="./MRPC/", proxy=None)
pytorch/utils.py:117
↓ 2 callersFunctionpad_zero
(seqs, max_len)
utils.py:58
↓ 2 callersFunctionpad_zero
(seqs, max_len)
pytorch/utils.py:55
↓ 2 callersFunctionprocess_w2v_data
(corpus,skip_window=2,method = "skip_gram")
pytorch/utils.py:75
↓ 2 callersFunctionsafe_log
(x)
tf_idf.py:30
↓ 2 callersMethodsample
(self,n)
pytorch/utils.py:67
↓ 2 callersMethodset_attention
(self, x)
seq2seq_attention.py:64
↓ 2 callersFunctionshow_tfidf
(tfidf, vocab, filename)
visual.py:9
↓ 2 callersFunctionshow_w2v_word_embedding
(model, data: utils.Dataset, path)
visual.py:22
↓ 2 callersFunctionshow_w2v_word_embedding
(model,data,path)
pytorch/visual.py:3
↓ 2 callersMethodstep
(self, x, y, seq_len)
seq2seq_attention.py:99
↓ 2 callersMethodstep
(self, x, y, seq_len)
seq2seq.py:76
↓ 2 callersMethodstep
(self, x, y, seq_len)
cnn-lm.py:85
↓ 2 callersFunctiontrain
(model, data, step=10000, name="gpt")
GPT.py:97
↓ 1 callersFunctionBLEU
(references, generated, max_grams=4, weights=None)
BLEU.py:5
↓ 1 callersMethod__init__
(self, model, v_dim, emb_dim)
simple_realize/CBOW.py:95
↓ 1 callersMethod__init__
(self, enc_v_dim, dec_v_dim, emb_dim, units, max_pred_len, start_token, end_token)
simple_realize/seq2seq.py:16
↓ 1 callersMethod__init__
(self, enc_v_dim, dec_v_dim, emb_dim, units, max_pred_len, start_token, end_token)
simple_realize/cnn-lm.py:16
↓ 1 callersMethod__init__
(self, model, v_dim, emb_dim)
simple_realize/skip-gram.py:95
↓ 1 callersFunction_text_standardize
(text)
utils.py:80
↓ 1 callersFunction_text_standardize
(text)
pytorch/utils.py:132
↓ 1 callersMethodbuild
(self, input_shape)
simple_realize/seq2seq_attention.py:54
↓ 1 callersMethodcall
(self, x, training=None, mask=None)
CBOW.py:53
↓ 1 callersMethodcall
(self, x, y, training=None)
transformer.py:159
↓ 1 callersMethodcall
(self, x, training=None, mask=None)
skip-gram.py:53
↓ 1 callersMethoddecode
(self, batch,enc_o, h, c, y=None, training=None)
simple_realize/seq2seq_attention.py:85
↓ 1 callersMethoddecode
(self, batch, h, c, y=None, training=None)
simple_realize/seq2seq.py:57
↓ 1 callersMethoddecode
(self, batch, h, c, y=None, training=None)
simple_realize/cnn-lm.py:69
↓ 1 callersFunctiondo_mask
(seq, len_arange, pad_id, mask_id)
BERT.py:48
↓ 1 callersFunctiondo_mask
(seq, len_arange, pad_id, mask_id)
pytorch/BERT.py:46
↓ 1 callersFunctiondo_nothing
(seq, len_arange, pad_id)
BERT.py:60
↓ 1 callersFunctiondo_nothing
(seq, len_arange, pad_id)
pytorch/BERT.py:56
↓ 1 callersFunctiondo_replace
(seq, len_arange, pad_id, word_ids)
BERT.py:54
↓ 1 callersFunctiondo_replace
(seq, len_arange, pad_id, word_ids)
pytorch/BERT.py:51
↓ 1 callersFunctiondocs_score
(q, len_norm=False)
tf_idf.py:85
↓ 1 callersMethodencode
(self, x)
seq2seq_attention.py:58
↓ 1 callersMethodencode
(self, x)
simple_realize/seq2seq_attention.py:80
↓ 1 callersMethodencode
(self, x)
simple_realize/seq2seq.py:52
↓ 1 callersMethodencode
(self, x)
simple_realize/cnn-lm.py:59
↓ 1 callersFunctionexport_attention
(model, data, name="transformer")
transformer.py:245
↓ 1 callersFunctionexport_attention
(model, data, name="bert")
BERT.py:118
↓ 1 callersFunctionexport_attention
(model,device,data,name="gpt")
pytorch/GPT.py:112
↓ 1 callersFunctionexport_attention
(model,device,data,name="bert")
pytorch/BERT.py:136
↓ 1 callersFunctionexport_w2v
(model, data)
ELMo.py:95
↓ 1 callersFunctionexport_w2v
(model,data,device)
pytorch/ELMo.py:107
↓ 1 callersMethodget_emb
(self, seqs)
ELMo.py:62
↓ 1 callersMethodget_emb
(self,seqs)
pytorch/ELMo.py:60
↓ 1 callersFunctionget_idf
(method="log")
tf_idf.py:63
↓ 1 callersFunctionget_keywords
(n=2)
tf_idf.py:114
↓ 1 callersFunctionget_tf
(method="log")
tf_idf.py:49
↓ 1 callersMethodinference
(self, x)
seq2seq.py:53
↓ 1 callersMethodinference
(self, x)
cnn-lm.py:62
↓ 1 callersMethodinference
(self,x,return_align=False)
pytorch/seq2seq_attention.py:36
↓ 1 callersMethodinference
(self,x)
pytorch/cnn_lm.py:46
↓ 1 callersMethodinference
(self,x)
pytorch/seq2seq.py:39
↓ 1 callersMethodinput_emb
(self, seqs, segs)
GPT.py:65
↓ 1 callersMethodinput_emb
(self,seqs, segs)
pytorch/GPT.py:53
↓ 1 callersMethodloss
(self, x, y, training=None)
CBOW.py:61
↓ 1 callersMethodloss
(self, x, y, training=None)
skip-gram.py:60
↓ 1 callersMethodloss
(self, x, y, training=None)
pytorch/CBOW.py:50
↓ 1 callersMethodloss
(self,x,y,training=None)
pytorch/skip_gram.py:50
↓ 1 callersMethodmask
abcd-- a011111 b001111 c000111 d000011 -000011 -000011 force head not to see afterw
GPT.py:68
next →1–100 of 287, ranked by callers