Skip to content

Commit

Permalink
Solve bug not updating SAC alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
GPaolo authored Oct 3, 2024
1 parent 38c313f commit 54b0b26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cleanrl/sac_continuous_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 54b0b26

Please sign in to comment.