Skip to content

Commit

Permalink
small fix for last_layer hanging gradients with PAINN
Browse files Browse the repository at this point in the history
  • Loading branch information
RylieWeaver committed Oct 29, 2024
1 parent 0fafea7 commit da184f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hydragnn/models/PAINNStack.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ def __init__(

def _init_conv(self):
last_layer = 1 == self.num_conv_layers
self.graph_convs.append(self.get_conv(self.input_dim, self.hidden_dim))
self.graph_convs.append(
self.get_conv(self.input_dim, self.hidden_dim, last_layer)
)
self.feature_layers.append(nn.Identity())
for i in range(self.num_conv_layers - 1):
last_layer = i == self.num_conv_layers - 2
Expand Down

0 comments on commit da184f0

Please sign in to comment.