f8c40c1d576bc4e1c4edd51b288a7e398b37f5ce,torch_geometric/nn/conv/graph_conv.py,GraphConv,forward,#GraphConv#Any#Any#,41
Before Change
// Normalize by node degree (if wished).
if self.norm:
deg = degree(row, x.size(0), x.dtype)
out = out / deg.unsqueeze(-1).clamp(min=1)
// Weight root node separately (if wished).
if self.root is not None:
out = out + torch.mm(x, self.root)
After Change
def forward(self, x, edge_index):
x = x.unsqueeze(-1) if x.dim() == 1 else x
edge_index, _ = remove_self_loops(edge_index)
row, col = edge_index
out = torch.mm(x, self.weight)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: rusty1s/pytorch_geometric
Commit Name: f8c40c1d576bc4e1c4edd51b288a7e398b37f5ce
Time: 2018-12-12
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/conv/graph_conv.py
Class Name: GraphConv
Method Name: forward
Project Name: rusty1s/pytorch_geometric
Commit Name: 46887e49fe301323e82a258a8063db846ac63339
Time: 2018-11-16
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/prop/gcn_prop.py
Class Name: GCNProp
Method Name: forward
Project Name: graphbrain/graphbrain
Commit Name: e911d269b0af4ff6d541c082ad78168d6d6a0e49
Time: 2017-03-04
Author: telmo@telmomenezes.net
File Name: gb/disambiguation/disambiguate.py
Class Name:
Method Name: disambiguate