Skip to content

Commit

Permalink
Update test/test_modules.py
Browse files Browse the repository at this point in the history
Co-authored-by: Vincent Moens <vincentmoens@gmail.com>
  • Loading branch information
albertbou92 and vmoens authored Dec 1, 2023
1 parent e3012f2 commit 6c0fff1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/test_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,8 @@ def test_python_lstm_cell(device, bias):
lstm_cell1 = LSTMCell(10, 20, device=device, bias=bias)
lstm_cell2 = nn.LSTMCell(10, 20, device=device, bias=bias)

lstm_cell1.load_state_dict(lstm_cell2.state_dict())

# Make sure parameters match
for (k1, v1), (k2, v2) in zip(
lstm_cell1.named_parameters(), lstm_cell2.named_parameters()
Expand Down

0 comments on commit 6c0fff1

Please sign in to comment.