88daeb748b31ad27de6c34630968e0fc191e4326,fairseq/data/strip_token_dataset.py,StripTokenDataset,__getitem__,#StripTokenDataset#Any#,15

Before Change



    def __getitem__(self, index):
        item = self.dataset[index]
        return item[item.ne(self.id_to_strip)]

After Change


            item = item[:-1]
        while len(item) > 0 and item[0] == self.id_to_strip:
            item = item[1:]
        return item
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pytorch/fairseq
Commit Name: 88daeb748b31ad27de6c34630968e0fc191e4326
Time: 2020-04-14
Author: myleott@fb.com
File Name: fairseq/data/strip_token_dataset.py
Class Name: StripTokenDataset
Method Name: __getitem__


Project Name: bearpaw/pytorch-pose
Commit Name: 7ce6642f777e9da6249bd5b05330d57fa09ea37a
Time: 2019-01-07
Author: platero.yang@gmail.com
File Name: pose/utils/evaluation.py
Class Name:
Method Name: dist_acc