MCPcopy Create free account

hub / github.com/agadetsky/pytorch-definitions / functions

Functions58 in github.com/agadetsky/pytorch-definitions

↓ 28 callersMethodload
(self, path)
source/datasets.py:61
↓ 10 callersMethodencode_seq
(self, arr)
source/datasets.py:40
↓ 7 callersMethodadd_token
(self, tok)
source/datasets.py:52
↓ 7 callersFunctionpad
(seq, size, value)
source/datasets.py:70
↓ 7 callersMethodsave
(self, path)
source/datasets.py:57
↓ 4 callersMethod__init__
(self)
source/layers.py:12
↓ 3 callersMethodencode
(self, tok)
source/datasets.py:28
↓ 3 callersFunctiongenerate
model - DefinitionModelingModel voc - model Vocabulary tau - temperature to generate with n - number of samples length - length o
source/pipeline.py:123
↓ 3 callersMethodinit_embeddings_from_pretrained
(self, weights, freeze)
source/model.py:168
↓ 3 callersMethodstep
(self)
source/utils.py:78
↓ 2 callersMethoddecode
(self, idx)
source/datasets.py:34
↓ 2 callersFunctionget_bleu_score
(bleu_path, all_ref_paths, d, hyp_path)
bleu.py:75
↓ 2 callersMethodinit_embeddings
(self, freeze)
source/model.py:162
↓ 2 callersMethodinit_linear
(self)
source/model.py:196
↓ 2 callersMethodinit_rnn
(self)
source/model.py:171
↓ 2 callersFunctionnext_n_lines
(file_opened, N)
bleu.py:37
↓ 2 callersFunctiontest
Function for testing the model on dataloader dataloader - either LanguageModeling or DefinitionModeling dataloader model - Defini
source/pipeline.py:66
↓ 2 callersMethodzero_grad
(self)
source/utils.py:74
↓ 1 callersMethoddecode_seq
(self, arr)
source/datasets.py:46
↓ 1 callersFunctiongenerate_batch
(batch_size=128)
train_attention_skipgram.py:162
↓ 1 callersFunctiongenerate_neg
(batch_size, negative=10)
train_attention_skipgram.py:158
↓ 1 callersMethodget_mask
(self, context)
source/layers.py:62
↓ 1 callersMethodinit_attn
(self, freeze)
source/layers.py:72
↓ 1 callersMethodinit_attn_from_pretrained
(self, weights, freeze)
source/layers.py:82
↓ 1 callersMethodinit_ch
(self)
source/layers.py:141
↓ 1 callersMethodinit_gated
(self)
source/layers.py:227
↓ 1 callersMethodinit_hidden
(self)
source/layers.py:180
↓ 1 callersMethodinit_linear_from_pretrained
(self, weights)
source/model.py:201
↓ 1 callersMethodinit_rnn_from_pretrained
(self, weights)
source/model.py:179
↓ 1 callersMethodinit_weights
(self)
source/model.py:208
↓ 1 callersFunctionprepare_ada_vectors_from_python
file - path to file with words and contexts on each line separated by \t, words and punctuation marks in contexts are separated by spaces
source/utils.py:9
↓ 1 callersFunctionprepare_w2v_vectors
file - path to file with words and contexts on each line separated by \t, words and punctuation marks in contexts are separated by spaces
source/utils.py:41
↓ 1 callersFunctionread_def_file
(file, n, with_contexts=False)
bleu.py:41
↓ 1 callersFunctionread_ref_file
(file, with_contexts=False)
bleu.py:58
↓ 1 callersFunctiontrain_epoch
Function for training the model one epoch dataloader - either LanguageModeling or DefinitionModeling dataloader model - Definitio
source/pipeline.py:10
FunctionDefinitionModelingCollate
(batch)
source/datasets.py:214
FunctionLanguageModelingCollate
(batch)
source/datasets.py:104
Method__getitem__
(self, idx)
source/datasets.py:95
Method__getitem__
(self, idx)
source/datasets.py:190
Method__init__
(self, n_attn_tokens, n_attn_embsize, n_attn_hid, attn_dropout, sparse=False)
source/layers.py:27
Method__init__
(self, n_ch_tokens, ch_maxlen, ch_emb_size, ch_feature_maps, ch_kernel_sizes)
source/layers.py:92
Method__init__
(self, cond_size, hidden_size, out_size)
source/layers.py:157
Method__init__
(self, cond_size, hidden_size)
source/layers.py:191
Method__init__
(self, *op)
source/utils.py:71
Method__init__
(self)
source/datasets.py:11
Method__init__
Args: file (string): Path to the file vocab_path (string): path to word vocab to use bptt (int): length o
source/datasets.py:79
Method__init__
Args: file (string): path to the file vocab_path (string): path to word vocab to use input_vectors_path (
source/datasets.py:127
Method__init__
(self, n_attn_tokens, n_attn_embsize, n_attn_hid, attn_dropout, sparse=False)
source/attention_skipgram.py:9
Method__init__
(self, params)
source/model.py:12
Method__len__
(self)
source/datasets.py:92
Method__len__
(self)
source/datasets.py:187
Methodforward
Vectors are already prepaired in DataLoaders, so just return them
source/layers.py:15
Methodforward
(self, word, context)
source/layers.py:57
Methodforward
(self, x)
source/layers.py:127
Methodforward
(self, hidden, conds)
source/layers.py:168
Methodforward
(self, hidden, conds)
source/layers.py:209
Methodforward
(self, words, context, neg)
source/attention_skipgram.py:32
Methodforward
x - definitions/LM_sequence to read input - vectors for Input, Input-Adaptive or dummy conditioning word - words for Input-At
source/model.py:111