f0f4b54881ba31bfdd8ab6178539e861d5b1ccde,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


    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,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


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: 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: kymatio/kymatio
Commit Name: cd70f04b464672bb583dea9003877aaf52e69d5b
Time: 2018-11-29
Author: janden@flatironinstitute.org
File Name: kymatio/scattering1d/scattering1d.py
Class Name: Scattering1D
Method Name: forward