Skip to content

Commit d18ba11

Browse files
authored
1 parent eed36cb commit d18ba11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

intermediate_source/dqn_with_rnn_tutorial.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@
342342
# will return a new instance of the LSTM (with shared weights) that will
343343
# assume that the input data is sequential in nature.
344344
#
345-
policy = Seq(feature, lstm.set_recurrent_mode(True), mlp, qval)
345+
lstm = torch.nn.LSTM(input_size, hidden_size, num_layers, default_recurrent_mode=True)
346+
policy = Seq(feature, lstm, mlp, qval)
346347

347348
######################################################################
348349
# Because we still have a couple of uninitialized parameters we should

0 commit comments

Comments
 (0)