9f4bcf25821b115fbd25e31165b91bdd6f22dcbe,torch_geometric/nn/conv/gravnet_conv.py,GravNetConv,aggregate,#GravNetConv#Any#Any#Any#Any#,69
Before Change
def aggregate(self, inputs, index, ptr=None, dim_size=None):
//this is probably not needed
if ptr is not None:
raise ValueError("`GravNetConv` does not support `ptr` in aggregate.")
return torch.cat([scatter(inputs, index, dim=self.node_dim, dim_size=dim_size,reduce="mean"),
scatter(inputs, index, dim=self.node_dim, dim_size=dim_size,reduce="max")], dim=1)
def message(self, x_i, x_j, edge_weights):
After Change
return x_j * edge_weight.unsqueeze(1)
def aggregate(self, inputs, index, ptr=None, dim_size=None):
if ptr is not None:
for _ in range(self.node_dim):
ptr = ptr.unsqueeze(0)
aggr_mean = segment_csr(inputs, ptr, reduce="mean")
aggr_max = segment_csr(inputs, ptr, reduce="max")
else:
aggr_mean = scatter(inputs, index, dim=self.node_dim,
dim_size=dim_size, reduce="mean")
aggr_max = scatter(inputs, index, dim=self.node_dim,
dim_size=dim_size, reduce="max")
return torch.cat([aggr_mean, aggr_max], dim=-1)
def __repr__(self):
return "{}({}, {}, k={})".format(self.__class__.__name__,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: rusty1s/pytorch_geometric
Commit Name: 9f4bcf25821b115fbd25e31165b91bdd6f22dcbe
Time: 2020-04-06
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/conv/gravnet_conv.py
Class Name: GravNetConv
Method Name: aggregate
Project Name: rusty1s/pytorch_geometric
Commit Name: f0f4b54881ba31bfdd8ab6178539e861d5b1ccde
Time: 2020-05-31
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/conv/gravnet_conv.py
Class Name: GravNetConv
Method Name: aggregate
Project Name: cornellius-gp/gpytorch
Commit Name: 418f0445cd4baa9457fc23361803ae3c3a32a336
Time: 2020-06-11
Author: kaw293@cornell.edu
File Name: gpytorch/kernels/rff_kernel.py
Class Name: RFFKernel
Method Name: forward