We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
LazyTensorStorage
1 parent d59b810 commit c0c32a0Copy full SHA for c0c32a0
torchrl/data/replay_buffers/storages.py
@@ -867,10 +867,10 @@ def max_size_along_dim0(data_shape):
867
return (self.max_size, *data_shape)
868
869
if is_tensor_collection(data):
870
- out = data.expand(max_size_along_dim0(data.shape))
+ out = data.to(self.device)
871
+ out = out.expand(max_size_along_dim0(data.shape))
872
out = out.clone()
873
out = out.zero_()
- out = out.to(self.device)
874
else:
875
# if Tensor, we just create a MemoryMappedTensor of the desired shape, device and dtype
876
out = tree_map(
0 commit comments