mirror of
https://github.com/labmlai/annotated_deep_learning_paper_implementations.git
synced 2025-08-16 10:51:23 +08:00
🐛 lstm fix
This commit is contained in:
@ -122,7 +122,7 @@ class LSTM(Module):
|
|||||||
(h, c) = state
|
(h, c) = state
|
||||||
# Reverse stack the tensors to get the states of each layer <br />
|
# Reverse stack the tensors to get the states of each layer <br />
|
||||||
# 📝 You can just work with the tensor itself but this is easier to debug
|
# 📝 You can just work with the tensor itself but this is easier to debug
|
||||||
h, c = torch.unbind(h), torch.unbind(c)
|
h, c = list(torch.unbind(h)), list(torch.unbind(c))
|
||||||
|
|
||||||
# Array to collect the outputs of the final layer at each time step.
|
# Array to collect the outputs of the final layer at each time step.
|
||||||
out = []
|
out = []
|
||||||
|
Reference in New Issue
Block a user