mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-07-28 20:11:31 +00:00
Merge branch 'master' into feat/crr
This commit is contained in:
commit
ff24b864e6
2 changed files with 3 additions and 2 deletions
|
|
@ -25,6 +25,7 @@ Others:
|
|||
^^^^^^^
|
||||
- Improve typing coverage of the ``VecEnv``
|
||||
- Removed ``AlreadySteppingError`` and ``NotSteppingError`` that were not used
|
||||
- Fixed typos in SAC and TD3
|
||||
|
||||
Documentation:
|
||||
^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -152,10 +152,10 @@ class TD3(OffPolicyAlgorithm):
|
|||
target_q = replay_data.rewards + (1 - replay_data.dones) * self.gamma * target_q
|
||||
|
||||
# Get current Q estimates for each critic network
|
||||
current_q_esimates = self.critic(replay_data.observations, replay_data.actions)
|
||||
current_q_estimates = self.critic(replay_data.observations, replay_data.actions)
|
||||
|
||||
# Compute critic loss
|
||||
critic_loss = sum([F.mse_loss(current_q, target_q) for current_q in current_q_esimates])
|
||||
critic_loss = sum([F.mse_loss(current_q, target_q) for current_q in current_q_estimates])
|
||||
|
||||
# Optimize the critics
|
||||
self.critic.optimizer.zero_grad()
|
||||
|
|
|
|||
Loading…
Reference in a new issue