Skip to content

Commit

Permalink
Update torchrl/data/replay_buffers/replay_buffers.py
Browse files Browse the repository at this point in the history
Co-authored-by: Vincent Moens <[email protected]>
  • Loading branch information
matteobettini and vmoens authored Oct 3, 2023
1 parent 81dcee7 commit bb74238
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchrl/data/replay_buffers/replay_buffers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb74238

Please sign in to comment.