File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,12 @@ def compile(
109109
110110 - For backend JAX:
111111
112- - `linear_schedule <https://optax.readthedocs.io/en/latest/api/optimizer_schedules.html#optax.schedules.linear_schedule>`_: ("linear", end_value, transition_steps)
113- - `cosine_decay_schedule <https://optax.readthedocs.io/en/latest/api/optimizer_schedules.html#optax.schedules.cosine_decay_schedule>`_: ("cosine", decay_steps, alpha)
114- - `exponential_decay <https://optax.readthedocs.io/en/latest/api/optimizer_schedules.html#optax.schedules.exponential_decay>`_: ("exponential", transition_steps, decay_rate)
112+ - `linear_schedule <https://optax.readthedocs.io/en/latest/api/optimizer_schedules.html#optax.schedules.linear_schedule>`_:
113+ ("linear", end_value, transition_steps)
114+ - `cosine_decay_schedule <https://optax.readthedocs.io/en/latest/api/optimizer_schedules.html#optax.schedules.cosine_decay_schedule>`_:
115+ ("cosine", decay_steps, alpha)
116+ - `exponential_decay <https://optax.readthedocs.io/en/latest/api/optimizer_schedules.html#optax.schedules.exponential_decay>`_:
117+ ("exponential", transition_steps, decay_rate)
115118
116119 loss_weights: A list specifying scalar coefficients (Python floats) to
117120 weight the loss contributions. The loss value that will be minimized by
Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ def _get_learningrate(lr, decay):
3838 return lr
3939 if decay [0 ] == "linear" :
4040 return optax .linear_schedule (lr , decay [1 ], decay [2 ])
41- elif decay [0 ] == "cosine" :
41+ if decay [0 ] == "cosine" :
4242 return optax .cosine_decay_schedule (lr , decay [1 ], decay [2 ])
43- elif decay [0 ] == "exponential" :
43+ if decay [0 ] == "exponential" :
4444 return optax .exponential_decay (lr , decay [1 ], decay [2 ])
4545
4646 raise NotImplementedError (
You can’t perform that action at this time.
0 commit comments