Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
albertbou92 committed Nov 22, 2023
1 parent 5399cf1 commit 39584ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchrl/objectives/value/advantages.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ def value_estimate(

if self.average_rewards:
reward = reward - reward.mean()
reward = reward / reward.std().clamp_min(1e-4)
reward = reward / reward.std().clamp_min(1e-5)
tensordict.set(
("next", self.tensor_keys.reward), reward
) # we must update the rewards if they are used later in the code
Expand Down

0 comments on commit 39584ab

Please sign in to comment.