Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 61d6dc6

Browse files
supplement another method
1 parent 2748b02 commit 61d6dc6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎tutorial-contents/403_RNN_regressor.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ def forward(self, x, h_state):
5757
# outs = self.out(r_out)
5858
# outs = outs.view(-1, TIME_STEP, 1)
5959
# return outs, h_state
60+
61+
# or even simpler, since nn.Linear can accept inputs of any dimension
62+
# and returns outputs with same dimension except for the last
63+
# outs = self.out(r_out)
64+
# return outs
6065

6166
rnn = RNN()
6267
print(rnn)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /