Skip to content

Commit

Permalink
Correctly handle cell state
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminMidtvedt committed May 23, 2024
1 parent ec8a77d commit f37b717
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deeplay/models/recurrentmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ def forward(self, x):
x = self.embedding_dropout(x)

outputs = x
outputs, hidden = super().forward(outputs)
if self.return_cell_state:
outputs, hidden = super().forward(outputs)
else:
outputs = super().forward(outputs)

if self.bidirectional:
outputs = (
Expand Down

0 comments on commit f37b717

Please sign in to comment.