Skip to content

Commit 4a6516a

Browse files
authored
[Refactor] Turn off default advantage normalization in PPO (#887)
1 parent 45cdbd1 commit 4a6516a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchrl/objectives/ppo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class PPOLoss(LossModule):
4848
gamma (scalar): a discount factor for return computation.
4949
loss_function (str): loss function for the value discrepancy. Can be one of "l1", "l2" or "smooth_l1".
5050
normalize_advantage (bool): if True, the advantage will be normalized before being used.
51-
Defaults to True.
51+
Defaults to False.
5252
5353
"""
5454

@@ -64,7 +64,7 @@ def __init__(
6464
critic_coef: float = 1.0,
6565
gamma: float = 0.99,
6666
loss_critic_type: str = "smooth_l1",
67-
normalize_advantage: bool = True,
67+
normalize_advantage: bool = False,
6868
):
6969
super().__init__()
7070
self.convert_to_functional(

0 commit comments

Comments
 (0)