e0f0cf7deb155eff91c306e6ca181c6f9c5ada7d,torch_geometric/nn/conv/nn_conv.py,NNConv,forward,#NNConv#Any#Any#Any#,66

Before Change


        out = scatter_(self.aggr, out, row, dim_size=x.size(0))

        if self.root is not None:
            out = out + torch.mm(x, self.root)

        if self.bias is not None:
            out = out + self.bias

        return out

    def __repr__(self):
        return "{}({}, {})".format(self.__class__.__name__, self.in_channels,
                                   self.out_channels)

After Change


        
        x = x.unsqueeze(-1) if x.dim() == 1 else x
        pseudo = edge_attr.unsqueeze(-1) if edge_attr.dim() == 1 else edge_attr
        return self.propagate(edge_index, x=x, pseudo=pseudo)

    def message(self, x_j, pseudo):
        weight = self.nn(pseudo).view(-1, self.in_channels, self.out_channels)
        return torch.matmul(x_j.unsqueeze(1), weight).squeeze(1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: e0f0cf7deb155eff91c306e6ca181c6f9c5ada7d
Time: 2019-04-22
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/conv/nn_conv.py
Class Name: NNConv
Method Name: forward


Project Name: rusty1s/pytorch_geometric
Commit Name: a9e209bcb857651fe0ee9416acffbf81e5610fe5
Time: 2019-06-04
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/conv/edge_conv.py
Class Name: EdgeConv
Method Name: forward


Project Name: rusty1s/pytorch_geometric
Commit Name: 2d64684041ddaa57c8692d7ddc114a408fec3982
Time: 2019-06-14
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/conv/sage_conv.py
Class Name: SAGEConv
Method Name: forward