e7cb8e2da07f62549cc6dbb1241c5dbe6f5622dd,models/AttModel.py,AttModel,__init__,#AttModel#Any#,36

Before Change


        self.fc_embed = nn.Sequential(nn.Linear(self.fc_feat_size, self.rnn_size),
                                    nn.ReLU(),
                                    nn.Dropout(self.drop_prob_lm))
        self.att_embed = nn.Sequential(nn.Linear(self.att_feat_size, self.rnn_size),
                                    nn.ReLU(),
                                    nn.Dropout(self.drop_prob_lm))
        self.logit = nn.Linear(self.rnn_size, self.vocab_size + 1)
        self.ctx2att = nn.Linear(self.rnn_size, self.att_hid_size)

After Change


        self.att_feat_size = opt.att_feat_size
        self.att_hid_size = opt.att_hid_size

        self.use_bn = getattr(opt, "use_bn", 0)

        self.ss_prob = 0.0 // Schedule sampling probability

        self.embed = nn.Sequential(nn.Embedding(self.vocab_size + 1, self.input_encoding_size),
                                nn.ReLU(),
                                nn.Dropout(self.drop_prob_lm))
        self.fc_embed = nn.Sequential(nn.Linear(self.fc_feat_size, self.rnn_size),
                                    nn.ReLU(),
                                    nn.Dropout(self.drop_prob_lm))
        self.att_embed = nn.Sequential(*(
                                    ((nn.BatchNorm1d(self.att_feat_size),) if self.use_bn else ())+
                                    (nn.Linear(self.att_feat_size, self.rnn_size),
                                    nn.ReLU(),
                                    nn.Dropout(self.drop_prob_lm))))
        self.logit = nn.Linear(self.rnn_size, self.vocab_size + 1)
        self.ctx2att = nn.Linear(self.rnn_size, self.att_hid_size)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: ruotianluo/ImageCaptioning.pytorch
Commit Name: e7cb8e2da07f62549cc6dbb1241c5dbe6f5622dd
Time: 2017-11-13
Author: rluo@ttic.edu
File Name: models/AttModel.py
Class Name: AttModel
Method Name: __init__


Project Name: ruotianluo/ImageCaptioning.pytorch
Commit Name: e7cb8e2da07f62549cc6dbb1241c5dbe6f5622dd
Time: 2017-11-13
Author: rluo@ttic.edu
File Name: models/AttModel.py
Class Name: AttModel
Method Name: __init__


Project Name: mariogeiger/se3cnn
Commit Name: 36839c8a51bc900b1b3ea1cc960b4dbc4ffeef75
Time: 2018-03-13
Author: wouterboomsma@gmail.com
File Name: arch/cath.py
Class Name: ResBlock
Method Name: __init__