4be4b134247cf79617480e5f4646dfa07bd96a4e,examples/pytorch/graphsage/experimental/train_dist.py,DistSAGE,__init__,#DistSAGE#Any#Any#Any#Any#Any#Any#,47

Before Change


class DistSAGE(SAGE):
    def __init__(self, in_feats, n_hidden, n_classes, n_layers,
                 activation, dropout):
        super(DistSAGE, self).__init__(in_feats, n_hidden, n_classes, n_layers,
                                       activation, dropout)

    def inference(self, g, x, batch_size, device):
        
        Inference with the GraphSAGE model on full neighbors (i.e. without neighbor sampling).

After Change


        for i in range(1, n_layers - 1):
            self.layers.append(dglnn.SAGEConv(n_hidden, n_hidden, "mean"))
        self.layers.append(dglnn.SAGEConv(n_hidden, n_classes, "mean"))
        self.dropout = nn.Dropout(dropout)
        self.activation = activation

    def forward(self, blocks, x):
        h = x
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dmlc/dgl
Commit Name: 4be4b134247cf79617480e5f4646dfa07bd96a4e
Time: 2020-07-31
Author: zhengda1936@gmail.com
File Name: examples/pytorch/graphsage/experimental/train_dist.py
Class Name: DistSAGE
Method Name: __init__


Project Name: dpressel/mead-baseline
Commit Name: 78a7f7de24c34235d0784a5781f46de34d2336eb
Time: 2019-10-29
Author: dpressel@gmail.com
File Name: python/eight_mile/tf/layers.py
Class Name: MultiHeadedAttention
Method Name: __init__


Project Name: dmlc/dgl
Commit Name: a6b44e72b7d58bc07e1cc0a9fa9fe0413fba57a1
Time: 2020-08-11
Author: coin2028@hotmail.com
File Name: examples/pytorch/gcmc/model.py
Class Name: DenseBiDecoder
Method Name: __init__