From bb7423816213253e1346f424cb50bb11cc138f9e Mon Sep 17 00:00:00 2001 From: Matteo Bettini <55539777+matteobettini@users.noreply.github.com> Date: Tue, 3 Oct 2023 21:05:42 +0100 Subject: [PATCH] Update torchrl/data/replay_buffers/replay_buffers.py Co-authored-by: Vincent Moens --- torchrl/data/replay_buffers/replay_buffers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchrl/data/replay_buffers/replay_buffers.py b/torchrl/data/replay_buffers/replay_buffers.py index 4694fdaef80..4f0a85a6934 100644 --- a/torchrl/data/replay_buffers/replay_buffers.py +++ b/torchrl/data/replay_buffers/replay_buffers.py @@ -694,7 +694,7 @@ def _get_priority_vector(self, tensordict: TensorDictBase) -> torch.Tensor: device=tensordict.device, ).expand(tensordict.shape[0]) - priority = priority.view(priority.shape[0], -1) + priority = priority.reshape(priority.shape[0], -1) priority = _reduce(priority, self._sampler.reduction, dim=1) return priority