Skip to content

Commit

Permalink
fix(pytorch): fix learning rate decay defaults (#414)
Browse files Browse the repository at this point in the history
This commit ensures that the 'lr_decay_type' argument is used when the user
doesn't specify the specific learning rate decays.
  • Loading branch information
rickstaa committed Feb 19, 2024
1 parent 43df73f commit 27964fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions stable_learning_control/algos/pytorch/lac/lac.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,10 +887,10 @@ def lac(
lr_alpha_final=1e-10,
lr_labda_final=1e-10,
lr_decay_type=DEFAULT_DECAY_TYPE,
lr_a_decay_type=DEFAULT_DECAY_TYPE,
lr_c_decay_type=DEFAULT_DECAY_TYPE,
lr_alpha_decay_type=DEFAULT_DECAY_TYPE,
lr_labda_decay_type=DEFAULT_DECAY_TYPE,
lr_a_decay_type=None,
lr_c_decay_type=None,
lr_alpha_decay_type=None,
lr_labda_decay_type=None,
lr_decay_ref=DEFAULT_DECAY_REFERENCE,
batch_size=256,
replay_size=int(1e6),
Expand Down
6 changes: 3 additions & 3 deletions stable_learning_control/algos/pytorch/sac/sac.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,9 +758,9 @@ def sac(
lr_c_final=1e-10,
lr_alpha_final=1e-10,
lr_decay_type=DEFAULT_DECAY_TYPE,
lr_a_decay_type=DEFAULT_DECAY_TYPE,
lr_c_decay_type=DEFAULT_DECAY_TYPE,
lr_alpha_decay_type=DEFAULT_DECAY_TYPE,
lr_a_decay_type=None,
lr_c_decay_type=None,
lr_alpha_decay_type=None,
lr_decay_ref=DEFAULT_DECAY_REFERENCE,
batch_size=256,
replay_size=int(1e6),
Expand Down

0 comments on commit 27964fe

Please sign in to comment.