From bb07f7cbc73d3b1a0fc2eb300a43ba3a480cfd27 Mon Sep 17 00:00:00 2001 From: Arvind C R Date: Thu, 21 Aug 2025 23:16:11 +0530 Subject: [PATCH] docs(rnn): fix LSTM example import\n\nInclude LSTMModule alongside MLP in the example import so the snippet runs without NameError.\n\nRefs: pytorch/rl#3119 --- torchrl/modules/tensordict_module/rnn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchrl/modules/tensordict_module/rnn.py b/torchrl/modules/tensordict_module/rnn.py index 5b47325551e..e25a6ba8f52 100644 --- a/torchrl/modules/tensordict_module/rnn.py +++ b/torchrl/modules/tensordict_module/rnn.py @@ -393,7 +393,7 @@ class LSTMModule(ModuleBase): Examples: >>> from torchrl.envs import TransformedEnv, InitTracker >>> from torchrl.envs import GymEnv - >>> from torchrl.modules import MLP + >>> from torchrl.modules import MLP, LSTMModule >>> from torch import nn >>> from tensordict.nn import TensorDictSequential as Seq, TensorDictModule as Mod >>> env = TransformedEnv(GymEnv("Pendulum-v1"), InitTracker())