cffa4034f580e33fe4295e9f1b54217e7fa724eb,examples/pytorch/gcn/gcn.py,GCN,forward,#GCN#Any#,66
Before Change
self.g.ndata["h"] = self.dropout(self.g.ndata["h"])
// normalization by square root of src degree
self.g.ndata["h"] = self.g.ndata["h"] * self.g.ndata["norm"]
self.g.update_all(gcn_msg, gcn_reduce, layer)
return self.g.ndata.pop("h")
def evaluate(model, features, labels, mask):
model.eval()
After Change
self.layers.append(GCNLayer(g, n_hidden, n_classes, None, dropout))
def forward(self, features):
h = features
for layer in self.layers:
h = layer(h)
return h
def evaluate(model, features, labels, mask):
model.eval()
with torch.no_grad():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: dmlc/dgl
Commit Name: cffa4034f580e33fe4295e9f1b54217e7fa724eb
Time: 2018-12-16
Author: zyhuang94@gmail.com
File Name: examples/pytorch/gcn/gcn.py
Class Name: GCN
Method Name: forward
Project Name: dmlc/dgl
Commit Name: 650f6ee1e0b3c2888a2c6d7db9c3d159cae5a583
Time: 2019-08-27
Author: expye@outlook.com
File Name: examples/pytorch/gin/gin.py
Class Name: GINLayer
Method Name: forward
Project Name: dmlc/dgl
Commit Name: f35ac5443e5028bd677d844cb1e7d724c4d41900
Time: 2018-12-16
Author: minjie.wang@nyu.edu
File Name: examples/pytorch/gcn/gcn_spmv.py
Class Name: GCN
Method Name: forward