Replies: 1 comment 5 replies
-
Hi @zehonyi21 I don't see any differences between the two code snippets. Isn't it in the first case that |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I saw example gcn.py on
'pytorch_geometric/examples/gcn.py'
(https://github.com/pyg-team/pytorch_geometric/blob/master/examples/gcn.py)
where the model code(line 57) is
def forward(self, x, edge_index, edge_weight=None):
x = F.dropout(x, p=0.5, training=self.training)
x = self.conv1(x, edge_index, edge_weight).relu()
x = F.dropout(x, p=0.5, training=self.training)
x = self.conv2(x, edge_index, edge_weight)
return x
But is this supposed to be
def forward(self, x, edge_index, edge_weight=None):
x = F.dropout(x, p=0.5, training=self.training)
x = self.conv1(x, edge_index, edge_weight)
x = F.relu(x)
x = F.dropout(x, p=0.5, training=self.training)
x = self.conv2(x, edge_index, edge_weight)
return x
because the former one does not put x into relu()
Thank you for your opinion in advance
Beta Was this translation helpful? Give feedback.
All reactions