Sigmoid#
- class vision_architectures.schedulers.sigmoid.SigmoidScheduler(min_y=0.0, max_y=1.0, min_x=-7, max_x=7)[source]#
Bases:
object
- class vision_architectures.schedulers.sigmoid.SigmoidLR(optimizer, min_lr, max_lr, total_steps, min_x=-3.0, max_x=3.0, last_epoch=-1, verbose='deprecated')[source]#
Bases:
LRScheduler- __init__(optimizer, min_lr, max_lr, total_steps, min_x=-3.0, max_x=3.0, last_epoch=-1, verbose='deprecated')[source]#
- get_lr()[source]#
Compute the next learning rate for each of the optimizer’s
param_groups.- Returns:
A
listof learning rates for each of the optimizer’sparam_groupswith the same types as their currentgroup["lr"]s.- Return type:
list[float | Tensor]
Note
If you’re trying to inspect the most recent learning rate, use
get_last_lr()instead.Note
The returned
Tensors are copies, and never alias the optimizer’sgroup["lr"]s.
- step(epoch=None)[source]#
Step the scheduler.
- Parameters:
epoch (int, optional) –
Deprecated since version 1.4: If provided, sets
last_epochtoepochand uses_get_closed_form_lr()if it is available. This is not universally supported. Usestep()without arguments instead.
Note
Call this method after calling the optimizer’s
step().