Sample batch_size noise matrices for SAC

This commit is contained in:
Antonin Raffin 2019-12-20 11:28:44 +01:00
parent 161c608f9c
commit 9b3b34c9c4

View file

@ -181,8 +181,8 @@ class SAC(BaseRLModel):
# is lost and we cannot backpropagate through again
# anyway, we need to sample because `log_std` may have changed between two gradient steps
if self.use_sde:
# self.actor.reset_noise(batch_size=batch_size)
self.actor.reset_noise()
self.actor.reset_noise(batch_size=batch_size)
# self.actor.reset_noise()
# Action by the current actor for the sampled state
action_pi, log_prob = self.actor.action_log_prob(obs)