Skip to content

Commit e7599c0

Browse files
author
Morvan Zhou
committed
update
1 parent 1b5fa9f commit e7599c0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tutorial-contents/403_RNN_regressor.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ def forward(self, x, h_state):
5353
outs.append(self.out(r_out[:, time_step, :]))
5454
return torch.stack(outs, dim=1), h_state
5555

56+
# instead, for simplicity, you can replace above codes by follows
57+
# r_out = r_out.view(-1, 32)
58+
# outs = self.out(r_out)
59+
# return outs, h_state
5660

5761
rnn = RNN()
5862
print(rnn)

0 commit comments

Comments
 (0)