optim.scheduler package

Submodules

optim.scheduler.base_scheduler module

class optim.scheduler.base_scheduler.BaseLRScheduler(opts)[source]

Bases: object

__init__(opts) None[source]
classmethod add_arguments(parser: ArgumentParser) ArgumentParser[source]
get_lr(epoch: int, curr_iter: int)[source]
update_lr(optimizer, epoch: int, curr_iter: int)[source]
static retrieve_lr(optimizer) list[source]
extra_repr() str[source]

Extra information to be represented in __repr__. Each line in the output string should be prefixed with `` ``.

optim.scheduler.cosine module

class optim.scheduler.cosine.CosineScheduler(opts, **kwargs)[source]

Bases: BaseLRScheduler

Cosine learning rate scheduler: https://arxiv.org/abs/1608.03983

__init__(opts, **kwargs) None[source]
classmethod add_arguments(parser: ArgumentParser) ArgumentParser[source]
get_lr(epoch: int, curr_iter: int) float[source]

optim.scheduler.cyclic module

class optim.scheduler.cyclic.CyclicLRScheduler(opts, **kwargs)[source]

Bases: BaseLRScheduler

Cyclic LR: https://arxiv.org/abs/1811.11431

__init__(opts, **kwargs) None[source]
classmethod add_arguments(parser: ArgumentParser) ArgumentParser[source]
get_lr(epoch: int, curr_iter: int) float[source]

optim.scheduler.fixed module

class optim.scheduler.fixed.FixedLRScheduler(opts, **kwargs)[source]

Bases: BaseLRScheduler

Fixed learning rate scheduler with optional linear warm-up strategy

__init__(opts, **kwargs) None[source]
classmethod add_arguments(parser: ArgumentParser) ArgumentParser[source]
get_lr(epoch: int, curr_iter: int) float[source]

optim.scheduler.multi_step module

class optim.scheduler.multi_step.MultiStepLRScheduler(opts, **kwargs)[source]

Bases: BaseLRScheduler

Multi-step learning rate scheduler with optional linear warm-up strategy

__init__(opts, **kwargs) None[source]
classmethod add_arguments(parser: ArgumentParser) ArgumentParser[source]
get_lr(epoch: int, curr_iter: int) float[source]

optim.scheduler.polynomial module

class optim.scheduler.polynomial.PolynomialScheduler(opts, **kwargs)[source]

Bases: BaseLRScheduler

Polynomial LR scheduler

__init__(opts, **kwargs) None[source]
classmethod add_arguments(parser: ArgumentParser) ArgumentParser[source]
get_lr(epoch: int, curr_iter: int) float[source]

Module contents

optim.scheduler.build_scheduler(opts: Namespace, *args, **kwargs) BaseLRScheduler[source]
optim.scheduler.general_lr_sch_args(parser: ArgumentParser) ArgumentParser[source]
optim.scheduler.arguments_scheduler(parser: ArgumentParser) ArgumentParser[source]