4e43734dd0b7f1c026069af64151a8f52f41060d,torch_geometric/nn/conv/gat_conv.py,GATConv,forward,#GATConv#Any#Any#,86
Before Change
edge_index, _ = remove_self_loops(edge_index)
edge_index, _ = add_self_loops(edge_index, num_nodes=x.size(0))
x = torch.mm(x, self.weight).view(-1, self.heads, self.out_channels)
return self.propagate(edge_index, x=x, num_nodes=x.size(0))
def message(self, edge_index_i, x_i, x_j, num_nodes):
// Compute attention coefficients.
alpha = (torch.cat([x_i, x_j], dim=-1) * self.att).sum(dim=-1)
After Change
Args:
in_channels (int): Size of each input sample.
out_channels (int): Size of each output sample.
heads (int, optional): Number of multi- head-attentions.
(default: :obj:`1`)
concat (bool, optional): If set to :obj:`False`, the multi-head
attentions are averaged instead of concatenated.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: rusty1s/pytorch_geometric
Commit Name: 4e43734dd0b7f1c026069af64151a8f52f41060d
Time: 2019-07-03
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/conv/gat_conv.py
Class Name: GATConv
Method Name: forward
Project Name: bearpaw/pytorch-pose
Commit Name: 447f94818fce0e45ee008ab5ef3f5c93e3416dc3
Time: 2017-05-25
Author: platero.yang@gmail.com
File Name: pose/utils/transforms.py
Class Name:
Method Name: transform
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