SYMBOL INDEX (85 symbols across 6 files) FILE: data.py class PrecompDataset (line 11) | class PrecompDataset(data.Dataset): method __init__ (line 17) | def __init__(self, data_path, data_split, vocab): method __getitem__ (line 41) | def __getitem__(self, index): method __len__ (line 59) | def __len__(self): function collate_fn (line 63) | def collate_fn(data): function get_precomp_loader (line 92) | def get_precomp_loader(data_path, data_split, vocab, opt, batch_size=100, function get_loaders (line 104) | def get_loaders(data_name, vocab, batch_size, workers, opt): function get_test_loader (line 117) | def get_test_loader(split_name, data_name, vocab, batch_size, workers, o... FILE: evaluation.py class AverageMeter (line 17) | class AverageMeter(object): method __init__ (line 20) | def __init__(self): method reset (line 23) | def reset(self): method update (line 29) | def update(self, val, n=0): method __str__ (line 35) | def __str__(self): class LogCollector (line 45) | class LogCollector(object): method __init__ (line 48) | def __init__(self): method update (line 52) | def update(self, k, v, n=0): method __str__ (line 58) | def __str__(self): method tb_log (line 68) | def tb_log(self, tb_logger, prefix='', step=None): function encode_data (line 75) | def encode_data(model, data_loader, log_step=10, logging=print): function evalrank (line 113) | def evalrank(model_path, data_path=None, split='dev', fold5=False): function shard_attn_scores (line 206) | def shard_attn_scores(model, img_embs, cap_embs, cap_lens, opt, shard_si... function i2t (line 228) | def i2t(images, captions, caplens, sims, npts=None, return_ranks=False): function t2i (line 264) | def t2i(images, captions, caplens, sims, npts=None, return_ranks=False): FILE: model.py function l1norm (line 16) | def l1norm(X, dim, eps=1e-8): function l2norm (line 23) | def l2norm(X, dim=-1, eps=1e-8): function cosine_sim (line 30) | def cosine_sim(x1, x2, dim=-1, eps=1e-8): class EncoderImage (line 38) | class EncoderImage(nn.Module): method __init__ (line 44) | def __init__(self, img_dim, embed_size, no_imgnorm=False): method init_weights (line 52) | def init_weights(self): method forward (line 59) | def forward(self, images): method load_state_dict (line 70) | def load_state_dict(self, state_dict): class EncoderText (line 81) | class EncoderText(nn.Module): method __init__ (line 87) | def __init__(self, vocab_size, word_dim, embed_size, num_layers, method init_weights (line 103) | def init_weights(self): method forward (line 106) | def forward(self, captions, lengths): class VisualSA (line 131) | class VisualSA(nn.Module): method __init__ (line 138) | def __init__(self, embed_dim, dropout_rate, num_region): method init_weights (line 152) | def init_weights(self): method forward (line 163) | def forward(self, local, raw_global): class TextSA (line 181) | class TextSA(nn.Module): method __init__ (line 189) | def __init__(self, embed_dim, dropout_rate): method init_weights (line 201) | def init_weights(self): method forward (line 212) | def forward(self, local, raw_global): class GraphReasoning (line 230) | class GraphReasoning(nn.Module): method __init__ (line 236) | def __init__(self, sim_dim): method forward (line 246) | def forward(self, sim_emb): method init_weights (line 254) | def init_weights(self): class AttentionFiltration (line 265) | class AttentionFiltration(nn.Module): method __init__ (line 271) | def __init__(self, sim_dim): method forward (line 279) | def forward(self, sim_emb): method init_weights (line 285) | def init_weights(self): class EncoderSimilarity (line 296) | class EncoderSimilarity(nn.Module): method __init__ (line 304) | def __init__(self, embed_size, sim_dim, module_name='AVE', sgr_step=3): method forward (line 326) | def forward(self, img_emb, cap_emb, cap_lens): method init_weights (line 373) | def init_weights(self): function SCAN_attention (line 384) | def SCAN_attention(query, context, smooth, eps=1e-8): class ContrastiveLoss (line 419) | class ContrastiveLoss(nn.Module): method __init__ (line 423) | def __init__(self, margin=0, max_violation=False): method forward (line 428) | def forward(self, scores): class SGRAF (line 455) | class SGRAF(object): method __init__ (line 459) | def __init__(self, opt): method state_dict (line 488) | def state_dict(self): method load_state_dict (line 492) | def load_state_dict(self, state_dict): method train_start (line 497) | def train_start(self): method val_start (line 503) | def val_start(self): method forward_emb (line 509) | def forward_emb(self, images, captions, lengths): method forward_sim (line 520) | def forward_sim(self, img_embs, cap_embs, cap_lens): method forward_loss (line 525) | def forward_loss(self, sims, **kwargs): method train_emb (line 532) | def train_emb(self, images, captions, lengths, ids=None, *args): FILE: opts.py function parse_opt (line 6) | def parse_opt(): FILE: train.py function main (line 29) | def main(): function train (line 74) | def train(opt, train_loader, model, epoch, val_loader): function validate (line 121) | def validate(opt, val_loader, model): function save_checkpoint (line 161) | def save_checkpoint(state, is_best, filename='checkpoint.pth.tar', prefi... function adjust_learning_rate (line 181) | def adjust_learning_rate(opt, optimizer, epoch): FILE: vocab.py class Vocabulary (line 15) | class Vocabulary(object): method __init__ (line 18) | def __init__(self): method add_word (line 23) | def add_word(self, word): method __call__ (line 29) | def __call__(self, word): method __len__ (line 34) | def __len__(self): function serialize_vocab (line 38) | def serialize_vocab(vocab, dest): function deserialize_vocab (line 47) | def deserialize_vocab(src): function from_txt (line 57) | def from_txt(txt): function build_vocab (line 65) | def build_vocab(data_path, data_name, caption_file, threshold): function main (line 95) | def main(data_path, data_name):