neuralogic.nn.optim.lr_scheduler packageο
Submodulesο
neuralogic.nn.optim.lr_scheduler.arithmetic moduleο
neuralogic.nn.optim.lr_scheduler.geometric moduleο
neuralogic.nn.optim.lr_scheduler.lr_decay moduleο
- class LRDecay[source]ο
Bases:
object- decay(epoch: int)[source]ο
Manually run the learning rate decay - this is useful when passing sample by sample into the training method instead of passing the whole batch of samples. In that case, the decay is not triggered automatically, as it is unknown what the current epoch is.
- Parameters:
epoch (int) β The number of the current epoch.
Module contentsο
- class ArithmeticLR(max_steps: int)[source]ο
Bases:
LRDecayDecay learning rate on every epoch by the following formula
\[\mathbf{lr}_i = \mathbf{lr}_{i-1} - \dfrac{\mathbf{lr}_{0}}{max\_steps}\]- Parameters:
max_steps (int)
- class GeometricLR(decay_rate: float, steps: int)[source]ο
Bases:
LRDecayDecay learning rate on every \(steps\) epoch by the following formula
\[\mathbf{lr}_i = \mathbf{lr}_{i-1} \cdot decay\_rate\]- Parameters:
decay_rate (float)
steps (int)
- class LRDecay[source]ο
Bases:
object- decay(epoch: int)[source]ο
Manually run the learning rate decay - this is useful when passing sample by sample into the training method instead of passing the whole batch of samples. In that case, the decay is not triggered automatically, as it is unknown what the current epoch is.
- Parameters:
epoch (int) β The number of the current epoch.