e2fb2549c038f412c683567fec393c379c3c3dd3,models/TransformerModel.py,TransformerModel,_prepare_feature_forward,#TransformerModel#Any#Any#Any#,301

Before Change



            seq_per_img = seq.shape[0] // att_feats.shape[0]
            if seq_per_img > 1:
                att_feats, att_masks = self.repeat_tensors(seq_per_img,
                    att_feats, att_masks
                )
        else:
            seq_mask = None

        return att_feats, seq, att_masks, seq_mask

After Change



            seq_per_img = seq.shape[0] // att_feats.shape[0]
            if seq_per_img > 1:
                att_feats, att_masks = utils.repeat_tensors(seq_per_img,
                    [att_feats, att_masks]
                )
        else:
            seq_mask = None

        return att_feats, seq, att_masks, seq_mask
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 10

Non-data size: 4

Instances


Project Name: ruotianluo/ImageCaptioning.pytorch
Commit Name: e2fb2549c038f412c683567fec393c379c3c3dd3
Time: 2020-02-14
Author: rluo@ttic.edu
File Name: models/TransformerModel.py
Class Name: TransformerModel
Method Name: _prepare_feature_forward


Project Name: ruotianluo/ImageCaptioning.pytorch
Commit Name: e2fb2549c038f412c683567fec393c379c3c3dd3
Time: 2020-02-14
Author: rluo@ttic.edu
File Name: models/AttModel.py
Class Name: AttModel
Method Name: _sample


Project Name: ruotianluo/self-critical.pytorch
Commit Name: e2fb2549c038f412c683567fec393c379c3c3dd3
Time: 2020-02-14
Author: rluo@ttic.edu
File Name: models/AttModel.py
Class Name: AttModel
Method Name: _old_sample_beam


Project Name: ruotianluo/self-critical.pytorch
Commit Name: e2fb2549c038f412c683567fec393c379c3c3dd3
Time: 2020-02-14
Author: rluo@ttic.edu
File Name: models/AttModel.py
Class Name: AttModel
Method Name: _sample_beam


Project Name: ruotianluo/ImageCaptioning.pytorch
Commit Name: e2fb2549c038f412c683567fec393c379c3c3dd3
Time: 2020-02-14
Author: rluo@ttic.edu
File Name: models/AttModel.py
Class Name: AttModel
Method Name: _forward