We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b204dc8 commit bd3d4f3Copy full SHA for bd3d4f3
torchrl/modules/tensordict_module/actors.py
@@ -2371,7 +2371,10 @@ def forward(
2371
action_entry = parent_td.get(action_key_orig[-1], None)
2372
if action_entry is None:
2373
raise self._NO_INIT_ERR
2374
- if self.n_steps is not None and action_entry.shape[parent_td.ndim] != self.n_steps:
+ if (
2375
+ self.n_steps is not None
2376
+ and action_entry.shape[parent_td.ndim] != self.n_steps
2377
+ ):
2378
raise RuntimeError(
2379
f"The action's time dimension (dim={parent_td.ndim}) doesn't match the n_steps argument ({self.n_steps}). "
2380
f"The action shape was {action_entry.shape}."
0 commit comments