Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Jan 3, 2024
1 parent 7cf7496 commit db9cac4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tensordict/_lazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
infer_size_impl,
is_tensorclass,
KeyedJaggedTensor,
lazy_legacy,
lock_blocked,
NestedKey,
)
Expand Down Expand Up @@ -785,6 +786,13 @@ def _get_str(
self._batch_size
+ out.batch_size[(len(self._batch_size) + incr) :]
)
elif not lazy_legacy():
# it must be a TensorDict
incr = 0 if not self._is_vmapped else 1
out._batch_size = (
self._batch_size
+ out.batch_size[(len(self._batch_size) + incr) :]
)
else:
# then it's a tensorclass
out._tensordict.hook_out = self.hook_out
Expand Down

0 comments on commit db9cac4

Please sign in to comment.