mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-07-27 20:02:30 +00:00
Fix n-step replay
This commit is contained in:
parent
693bfa9437
commit
e6573d6c22
1 changed files with 1 additions and 1 deletions
|
|
@ -457,7 +457,7 @@ class NstepReplayBuffer(ReplayBuffer):
|
|||
# Compute entropy term
|
||||
# TODO: convert to pytorch tensor on the correct device
|
||||
with th.no_grad():
|
||||
obs = th.as_tensor(self.observations[unique_indices, :]).to(self.actor.device)
|
||||
obs = th.as_tensor(self.observations[unique_indices, 0, :]).to(self.actor.device)
|
||||
_, log_prob = self.actor.action_log_prob(obs)
|
||||
|
||||
# Memory inneficient version but fast computation
|
||||
|
|
|
|||
Loading…
Reference in a new issue