6fac413c0c51c3be54de3a68801b43446ab98dee,graph/grid.py,,grid_points,#Any#,42
Before Change
h, w = size
x, y = np.meshgrid(np.arange(w), np.arange(h))
x = torch.FloatTensor(x)
y = torch.FloatTensor(y)
points = torch.FloatTensor(h * w, 2)
if torch.cuda.is_available():
x = x.cuda()
y = y.cuda()
points = points.cuda()
points[:, 0] = y.view(-1)
points[:, 1] = x.view(-1)
return points
After Change
y = y.cuda()
x = x.repeat(h)
y = y.view(-1, 1).repeat(1, w).view(-1)
return torch.cat((y, x)).view(2, -1).t()
size = torch.Size([3, 2])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: rusty1s/pytorch_geometric
Commit Name: 6fac413c0c51c3be54de3a68801b43446ab98dee
Time: 2017-10-08
Author: matthias.fey@tu-dortmund.de
File Name: graph/grid.py
Class Name:
Method Name: grid_points
Project Name: rusty1s/pytorch_geometric
Commit Name: cce8409beb4c1b662de2b9635cd723993184be23
Time: 2017-11-10
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/utils/faust_monet.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