Skip to content

Commit

Permalink
Merge pull request neuraloperator#197 from ziqi-ma/fixmlp
Browse files Browse the repository at this point in the history
Fix mlp nonlinearity
  • Loading branch information
JeanKossaifi authored Aug 20, 2023
2 parents bb88ad4 + 0d2e945 commit 655aacc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neuralop/layers/mlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, in_channels, out_channels=None, hidden_channels=None,
def forward(self, x):
for i, fc in enumerate(self.fcs):
x = fc(x)
if i < self.n_layers:
if i < self.n_layers - 1:
x = self.non_linearity(x)
if self.dropout is not None:
x = self.dropout(x)
Expand Down

0 comments on commit 655aacc

Please sign in to comment.