From db918a71d3159b1bd765c371346cb81615b7f709 Mon Sep 17 00:00:00 2001 From: vmoens Date: Tue, 10 Oct 2023 14:44:01 +0100 Subject: [PATCH] amend --- tensordict/memmap.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tensordict/memmap.py b/tensordict/memmap.py index a4dc5aa49..292783c24 100644 --- a/tensordict/memmap.py +++ b/tensordict/memmap.py @@ -732,8 +732,7 @@ def to( return out out = self.clone() - out.device = device - return self + return out.to(device) def unbind(self, dim: int) -> tuple[torch.Tensor, ...]: """Unbinds a MemmapTensor along the desired dimension.