fab47fcca9887402f7474c80545311fcb952566f,torch_geometric/transform/random_shear.py,RandomShear,__call__,#RandomShear#Any#,8

Before Change


        range = torch.arange(0, dim, out=torch.LongTensor())
        shear[range, range] = 1

        shear = shear.type_as(pos)
        pos = torch.matmul(shear, pos.view(-1, dim, 1))
        pos = pos.view(-1, dim)

        pos += mean

After Change



        matrix = data.pos.new_empty(dim, dim).uniform(-self.scale, self.scale)
        eye = torch.arange(dim, dtype=torch.long)
        matrix[eye, eye] = 1

        return LinearTransformation(matrix)(data)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: fab47fcca9887402f7474c80545311fcb952566f
Time: 2018-05-21
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/transform/random_shear.py
Class Name: RandomShear
Method Name: __call__


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