3795eabbdc08e59fe43622a0e1bffe3916332f0f,onmt/modules/ImageEncoder.py,ImageEncoder,forward,#ImageEncoder#Any#Any#,52

Before Change


                    Variable(torch.cuda.LongTensor(batchSize).fill_(row)))
            else:
                pos_emb = self.pos_lut(
                    Variable(torch.LongTensor(batchSize).fill_(row)))
            with_pos = torch.cat(
                (pos_emb.view(1, pos_emb.size(0), pos_emb.size(1)), inp), 0)
            outputs, hidden_t = self.rnn(with_pos)

After Change


        for row in range(input.size(2)):
            inp = input[:, :, row, :].transpose(0, 2)\
                                     .transpose(1, 2)
            row_vec = torch.Tensor(batchSize).type_as(input).long().fill_(row)
            pos_emb = self.pos_lut(Variable(row_vec))
            with_pos = torch.cat(
                (pos_emb.view(1, pos_emb.size(0), pos_emb.size(1)), inp), 0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 3795eabbdc08e59fe43622a0e1bffe3916332f0f
Time: 2017-12-11
Author: dengyuntian@gmail.com
File Name: onmt/modules/ImageEncoder.py
Class Name: ImageEncoder
Method Name: forward


Project Name: facebookresearch/end-to-end-negotiator
Commit Name: 1009c633783cbdc571ea34aaaa477ef438afbb40
Time: 2019-02-18
Author: denisyarats@gmail.com
File Name: src/agent.py
Class Name: LstmAgent
Method Name: _encode


Project Name: BindsNET/bindsnet
Commit Name: 182d46996e3a58df6c637367b09a0ca4babef122
Time: 2018-09-12
Author: djsaunde@umass.edu
File Name: bindsnet/evaluation/__init__.py
Class Name:
Method Name: ngram