05de5cfd5fe3953cdd50b1ec21f89e67d508f13f,torch_geometric/nn/functional/spline_gcn.py,,weight_indices,#Any#Any#,109

Before Change


    a = list(itertools.product(*[range(m) for _ in range(d)]))
    a = torch.LongTensor(a)

    adder = torch.LongTensor([0, 2, 4])

    a = a + adder
    a = a.view(-1)
    a = c[a]
    a = a.view(8, 3)
    print(a)
    // a = a.view(-1)
    // print(a)

After Change



    // Add up indices column-wise, so each column contains independent indices
    // ranging globally from 0 to m*d.
    a = a + torch.arange(0, d * m, m).long()

    // Fill in the spline indices.
    a = spline_indices.view(-1)[a.view(-1)].view(m**d, d)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: 05de5cfd5fe3953cdd50b1ec21f89e67d508f13f
Time: 2017-10-20
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/functional/spline_gcn.py
Class Name:
Method Name: weight_indices


Project Name: rusty1s/pytorch_geometric
Commit Name: 430beec651fe14e4f0f032cbc27e18a9ca415d90
Time: 2018-03-06
Author: matthias.fey@tu-dortmund.de
File Name: examples/cora.py
Class Name:
Method Name:


Project Name: cornellius-gp/gpytorch
Commit Name: 9b664bd7cd8dbb9657626166ba61887ed06774d7
Time: 2017-09-13
Author: gpleiss@gmail.com
File Name: gpytorch/utils/toeplitz.py
Class Name:
Method Name: index_coef_to_sparse