Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Oct 10, 2023
1 parent 86ac8fa commit b78eccf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tensordict/tensordict.py
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,10 @@ def map(
@cache # noqa: B019
def _add_batch_dim(self, *, in_dim, vmap_level):
if self.is_memmap():
td = self.cpu()
if self.device.type != "cpu":
td = self.cpu()
else:
td = self.as_tensor()
else:
td = self
out = TensorDict(
Expand Down

0 comments on commit b78eccf

Please sign in to comment.