Last active
December 20, 2019 23:37
-
-
Save juliensimon/54be78df11515fe1cada9fd5cc912425 to your computer and use it in GitHub Desktop.
DGL Part2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GCN(nn.Module): | |
def __init__(self, in_feats, hidden_size, num_classes): | |
super(GCN, self).__init__() | |
self.gcn1 = GCNLayer(in_feats, hidden_size) | |
self.gcn2 = GCNLayer(hidden_size, num_classes) | |
self.softmax = nn.Softmax() | |
def forward(self, g, inputs): | |
h = self.gcn1(g, inputs) | |
h = torch.relu(h) | |
h = self.gcn2(g, h) | |
h = self.softmax(h) | |
return h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment