"tests/dist/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "2caa6bd02d9d86c911021dcf86781645e27273d9"
Unverified Commit bda6a816 authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files
parent fa5ff2fc
......@@ -16,17 +16,17 @@ class GCN(nn.Module):
super().__init__()
# Two-layer GCN.
self.Theta1 = nn.Linear(in_size, hidden_size)
self.Theta2 = nn.Linear(hidden_size, out_size)
self.W1 = nn.Linear(in_size, hidden_size)
self.W2 = nn.Linear(hidden_size, out_size)
############################################################################
# (HIGHLIGHT) Take the advantage of DGL sparse APIs to implement the GCN
# forward process.
############################################################################
def forward(self, A_norm, X):
X = A_norm @ self.Theta1(X)
X = A_norm @ self.W1(X)
X = F.relu(X)
X = A_norm @ self.Theta2(X)
X = A_norm @ self.W2(X)
return X
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment