From 61d6dc6757bb7db7ef45d765efdcf88cdd227b4c Mon Sep 17 00:00:00 2001 From: keineahnung2345 Date: Mon, 12 Nov 2018 14:24:09 +0800 Subject: [PATCH] supplement another method --- tutorial-contents/403_RNN_regressor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tutorial-contents/403_RNN_regressor.py b/tutorial-contents/403_RNN_regressor.py index 4a959a6..2010ded 100644 --- a/tutorial-contents/403_RNN_regressor.py +++ b/tutorial-contents/403_RNN_regressor.py @@ -57,6 +57,11 @@ class RNN(nn.Module): # outs = self.out(r_out) # outs = outs.view(-1, TIME_STEP, 1) # return outs, h_state + + # or even simpler, since nn.Linear can accept inputs of any dimension + # and returns outputs with same dimension except for the last + # outs = self.out(r_out) + # return outs rnn = RNN() print(rnn)