Skip to content

Conversation

PedrV
Copy link
Contributor

@PedrV PedrV commented Oct 3, 2025

The intermediate layers of the GCNModel are not wrapped in a toch.nn.ModuleList. Even though the layers will be part of the computational graph and used to calculate the output (forward function) they will not receive updates. Thus, the loss values stagnate faster. Below is a table comparing the before and after (using torch.nn.ModuleList results in loss and predictions in accordance with the high level class torch_geometric.nn.GCN).

Epochs Current Loss (no nn.ModuleList) Current Loss (with nn.ModuleList)
1 0.9987501268 0.9987501268
101 0.2509162425 0.2193475552
201 0.2328345132 0.1971913761
301 0.2268480021 0.1748124764
401 0.2211235996 0.1493365754
1 0.9874023640 0.9874023640
101 0.2662649264 0.2149600081
201 0.2340450994 0.2014514608
301 0.2252406857 0.1755700728
401 0.2179228306 0.1556525099

@vabor112 vabor112 merged commit 8d89703 into vabor112:main Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants