e60669c5aa467d5c11a508c01b37c4ed8e352fa6,torch_geometric/nn/conv/supergat_conv.py,SuperGATConv,forward,#SuperGATConv#Any#Any#Any#Any#,159

Before Change


            else:
                pos_edge_index = edge_index

            att_with_neg_edges = self._get_att_logits_with_neg_edges(
                x=x,
                pos_edge_index=pos_edge_index,
                neg_edge_index=neg_edge_index,
            )  // [E + neg_E, heads]

            // X, Y for the self-supervised task
            self.att_with_neg_edges = att_with_neg_edges
            num_neg_edges = att_with_neg_edges.size(0)
            att_label = torch.zeros(num_neg_edges).float().to(x.device)
            att_label[:pos_edge_index.size(1)] = 1.
            self.att_label = att_label

        if self.concat is True:

After Change



            self.att_x = torch.cat([pos_att, neg_att], dim=0)
            self.att_y = self.att_x.new_zeros(self.att_x.size(0))
            self.att_y[:pos_edge_index.size(1)] = 1.

        if self.concat is True:
            out = out.view(-1, self.heads * self.out_channels)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 5

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: e60669c5aa467d5c11a508c01b37c4ed8e352fa6
Time: 2021-02-15
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/conv/supergat_conv.py
Class Name: SuperGATConv
Method Name: forward


Project Name: dmlc/dgl
Commit Name: 117dd25204611382acc7c9f460aeeb3a023ef721
Time: 2021-02-08
Author: coin2028@hotmail.com
File Name: new-tutorial/L1_large_node_classification.py
Class Name:
Method Name:


Project Name: dmlc/dgl
Commit Name: 264d96cdf54667c0efaa943185ebe4f121a423ad
Time: 2020-08-07
Author: expye@outlook.com
File Name: examples/pytorch/gat/train_ppi.py
Class Name:
Method Name: main


Project Name: PyThaiNLP/pythainlp
Commit Name: fd4b66763f91bf6e940184fb01a264c941a2e90e
Time: 2019-08-02
Author: arta@Chakris-MacBook-Pro-2.local
File Name: pythainlp/transliterate/thai2rom.py
Class Name: ThaiTransliterator
Method Name: __init__


Project Name: dmlc/dgl
Commit Name: 117dd25204611382acc7c9f460aeeb3a023ef721
Time: 2021-02-08
Author: coin2028@hotmail.com
File Name: new-tutorial/L4_message_passing.py
Class Name:
Method Name: