MCPcopy Create free account

hub / github.com/ExplorerFreda/VGNSL / functions

Functions81 in github.com/ExplorerFreda/VGNSL

↓ 9 callersFunctionindex_one_hot_ellipsis
(tensor, dim, index)
src/utils.py:139
↓ 9 callersMethodupdate
(self, val, n=0)
src/evaluation.py:28
↓ 8 callersFunctionl2norm
(x, dim=-1)
src/utils.py:109
↓ 5 callersFunctionsequence_mask
(sequence_length, max_length=None)
src/utils.py:126
↓ 4 callersMethod__init__
(self, opt)
src/model.py:247
↓ 4 callersMethodfromstring
(cls, st)
analysis/constituent_recall.py:9
↓ 4 callersMethodupdate_with_mask
(lv, rv, cv, lm, rm, cm)
src/model.py:171
↓ 3 callersFunctionconcat_shape
(*shapes)
src/utils.py:82
↓ 3 callersMethodforward_emb
Compute the image and caption embeddings
src/model.py:294
↓ 3 callersFunctionget_precomp_loader
(data_path, data_split, vocab, batch_size=128, shuffle=True, num_workers=2, load_img=Tr
src/data.py:66
↓ 2 callersFunctionadd_dim
(tensor, dim, size)
src/utils.py:100
↓ 2 callersFunctionadd_dim_as_except
(tensor, target, *excepts)
src/utils.py:192
↓ 2 callersFunctionextract_spans
(tree)
src/test.py:7
↓ 2 callersFunctiongenerate_tree
(captions, tree_indices, pos, vocab, pad_word='<pad>')
src/utils.py:113
↓ 2 callersMethodload_state_dict
(self, state_dict)
src/model.py:278
↓ 2 callersFunctionprod
(values, default=1)
src/utils.py:210
↓ 2 callersFunctionspans
(node, left=0)
analysis/constituent_recall.py:34
↓ 2 callersMethodstate_dict
(self)
src/model.py:274
↓ 2 callersMethodtrain_start
switch to train mode
src/model.py:284
↓ 2 callersFunctionvalidate
(opt, val_loader, model, vocab)
src/train.py:59
↓ 1 callersFunctionadjust_learning_rate
Sets the learning rate to the initial LR decayed by 10 every 30 epochs
src/train.py:85
↓ 1 callersFunctionbroadcast
(tensor, dim, size)
src/utils.py:92
↓ 1 callersFunctionclean_tree
(sentence, remove_tag_set={'<start>', '<end>', '<pad>'})
src/utils.py:216
↓ 1 callersFunctionconstituent_recall
(gold_captions, pred_trees, gold_trees=None)
analysis/constituent_recall.py:47
↓ 1 callersFunctionencode_data
Encode all images and captions loadable by `data_loader`
src/evaluation.py:68
↓ 1 callersFunctionextract_statistics
(gold_tree_spans, produced_tree_spans)
src/test.py:32
↓ 1 callersFunctionf1_score
(produced_trees, gold_trees)
src/test.py:42
↓ 1 callersMethodforward_reward
Compute the loss given pairs of image and caption embeddings
src/model.py:306
↓ 1 callersFunctionget_eval_loader
(data_path, split_name, vocab, batch_size, workers, load_img=False, img_dim=2048)
src/data.py:88
↓ 1 callersFunctionget_simplified_tree
Simplify a tree by removing all non-terminal labels and punctuation marks. Args: tree: An NLTK tree. Returns: A string
preprocess/parse_simplifier.py:6
↓ 1 callersFunctioni2t
Images->Text (Image Annotation) Images: (5N, K) matrix of images Captions: (5N, K) matrix of captions
src/evaluation.py:129
↓ 1 callersFunctionindex_mask
(indices, max_length)
src/utils.py:149
↓ 1 callersMethodinit_weights
Xavier initialization for the fully connected layer
src/model.py:32
↓ 1 callersFunctionlength2mask
(lengths, max_length)
src/utils.py:202
↓ 1 callersFunctionmake_embeddings
(opt, vocab_size, dim)
src/utils.py:52
↓ 1 callersFunctionremove_label
(tree)
data/add_c_parse.py:23
↓ 1 callersMethodreset
(self)
src/evaluation.py:22
↓ 1 callersFunctionsave_checkpoint
(state, is_best, curr_epoch, filename='checkpoint.pth.tar', prefix='')
src/train.py:78
↓ 1 callersFunctiont2i
Text->Images (Image Search) Images: (5N, K) matrix of images Captions: (5N, K) matrix of captions
src/evaluation.py:173
↓ 1 callersFunctiontest_trees
use the trained model to generate parse trees for text
src/evaluation.py:211
↓ 1 callersFunctiontrain
(opt, train_loader, model, epoch, val_loader, vocab)
src/train.py:16
↓ 1 callersMethodtrain_emb
one training step given images and captions
src/model.py:352
↓ 1 callersMethodupdate
(self, pred)
analysis/constituent_recall.py:19
↓ 1 callersMethodval_start
switch to evaluate mode
src/model.py:289
Method__call__
(self, word)
src/vocab.py:20
Method__getitem__
(self, index)
src/data.py:37
Method__init__
(self)
analysis/constituent_recall.py:15
Method__init__
(self)
src/evaluation.py:19
Method__init__
(self)
src/evaluation.py:47
Method__init__
(self, *embeddings)
src/utils.py:9
Method__init__
(self)
src/vocab.py:9
Method__init__
(self, data_path, data_split, vocab, load_img=True, img_dim=2048)
src/data.py:12
Method__init__
(self, img_dim, embed_size, no_imgnorm=False)
src/model.py:23
Method__init__
(self, opt, vocab_size, semantics_dim)
src/model.py:64
Method__init__
(self, margin=0)
src/model.py:183
Method__init__
(self, margin=0)
src/model.py:219
Method__len__
(self)
src/vocab.py:25
Method__len__
(self)
src/data.py:47
Method__repr__
(self)
analysis/constituent_recall.py:30
Method__str__
(self)
analysis/constituent_recall.py:27
Method__str__
String representation for logging
src/evaluation.py:34
Method__str__
Concatenate the meters in one log line
src/evaluation.py:57
Functionaccuracy
Computes the precision@k for the specified values of k
src/train.py:93
Methodadd_word
(self, word)
src/vocab.py:14
Functioncollate_fn
build mini-batch tensors from a list of (image, caption) tuples
src/data.py:51
Functioncosine_sim
Cosine similarity between all the image and sentence pairs
src/utils.py:104
Methodforward
(self, input)
src/utils.py:13
Methodforward
extract image feature vectors
src/model.py:39
Methodforward
sample a tree for each sentence
src/model.py:82
Methodforward
return the reward
src/model.py:188
Methodforward
(self, im, s)
src/model.py:224
Functionget_train_loaders
(data_path, vocab, batch_size, workers)
src/data.py:78
Functionindex_range_ellipsis
(x, a, b, dim=1, padding_zero=True)
src/utils.py:160
Methodload_state_dict
copies parameters, overwritting the default one to accept state_dict from Full model
src/model.py:50
Methodrecall
(self)
analysis/constituent_recall.py:24
Functionreplace_leaves
(tree, leaves)
data/add_c_parse.py:10
Methodreset_weights
(self)
src/model.py:79
Functiontree2list
(tokens)
src/utils.py:17
Functiontree2str
(tree)
src/utils.py:45
Functiontreelist2dict
(tree, d)
src/utils.py:37
Methodupdate
(self, k, v, n=0)
src/evaluation.py:51