7db6246fae613a5abf1fbea0b2b987b615ae5a13,visdialch/encoders/lf.py,LateFusionEncoder,forward,#LateFusionEncoder#Any#,42

Before Change


        ques_embed = self.ques_rnn(ques_embed, batch["ques_len"])

        // embed history
        hist = hist.view(-1, hist.size(2))
        hist_embed = self.word_embed(hist)
        hist_embed = self.hist_rnn(hist_embed, batch["hist_len"])

        fused_vector = torch.cat((img, ques_embed, hist_embed), 1)

After Change


        batch_size, num_rounds, max_sequence_length = ques.size()

        // average bottom-up features of all proposals, to form fc7-like features
        if img.dim() == 3:
            img = torch.mean(img, dim=1)  // shape: (batch, img_feature_size)

        // repeat image feature vectors to be provided for every round
        img = img.view(batch_size, 1, self.config["img_feature_size"])
        img = img.repeat(1, num_rounds, 1)
        img = img.view(batch_size * num_rounds, self.config["img_feature_size"])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: batra-mlp-lab/visdial-challenge-starter-pytorch
Commit Name: 7db6246fae613a5abf1fbea0b2b987b615ae5a13
Time: 2018-12-26
Author: karandesai281196@gmail.com
File Name: visdialch/encoders/lf.py
Class Name: LateFusionEncoder
Method Name: forward


Project Name: KaiyangZhou/deep-person-reid
Commit Name: 3ddf9ce6998e6a5d2052aba4286b8b899e03149e
Time: 2018-10-27
Author: k.zhou@qmul.ac.uk
File Name: torchreid/models/squeezenet.py
Class Name: SqueezeNet
Method Name: forward


Project Name: KaiyangZhou/deep-person-reid
Commit Name: 710b9ac1a28d418bddc41aeeda320ab4de4d17fe
Time: 2018-10-26
Author: k.zhou@qmul.ac.uk
File Name: torchreid/models/resnet.py
Class Name: ResNet101
Method Name: forward