From 54b0b26b0ae5a3cb4f866639ee585bd55b35e8e5 Mon Sep 17 00:00:00 2001 From: Giuseppe Paolo Date: Thu, 3 Oct 2024 16:05:33 +0200 Subject: [PATCH] Solve bug not updating SAC alpha --- cleanrl/sac_continuous_action.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cleanrl/sac_continuous_action.py b/cleanrl/sac_continuous_action.py index d28cb8e2..b200071a 100644 --- a/cleanrl/sac_continuous_action.py +++ b/cleanrl/sac_continuous_action.py @@ -284,7 +284,7 @@ def get_action(self, x): a_optimizer.zero_grad() alpha_loss.backward() a_optimizer.step() - alpha = log_alpha.exp().item() + self.alpha = log_alpha.exp().item() # update the target networks if global_step % args.target_network_frequency == 0: