Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit

Permalink
Update deep-rnn.md (d2l-ai#2332)
Browse files Browse the repository at this point in the history
* Update deep-rnn.md

I will received error `IndexError: list index out of range` while using the previous code.

* Update chapter_recurrent-modern/deep-rnn.md

Co-authored-by: Aston Zhang <22279212+astonzhang@users.noreply.github.com>
  • Loading branch information
LALBJ and astonzhang authored Nov 20, 2022
1 parent 030b3ac commit 9b1c0b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chapter_recurrent-modern/deep-rnn.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ layer by layer.
@d2l.add_to_class(StackedRNNScratch)
def forward(self, inputs, Hs=None):
outputs = inputs
if Hs is None: Hs = [None] * len(inputs)
if Hs is None: Hs = [None] * self.num_layers
for i in range(self.num_layers):
outputs, Hs[i] = self.rnns[i](outputs, Hs[i])
return outputs, Hs
Expand Down

0 comments on commit 9b1c0b7

Please sign in to comment.