TorchScheduler#
- class TorchScheduler(scheduler_class, **kwargs)[source]#
Bases:
Scheduler
A wrapper class for using PyTorch schedulers.
Initialization of the
TorchScheduler
class.- Parameters:
scheduler_class (torch.optim.LRScheduler) – A
torch.optim.LRScheduler
class.kwargs (dict) – Additional parameters passed to
scheduler_class
, see morehere <https://pytorch.org/docs/stable/optim.html#algorithms>_
.
- hook(optimizer)[source]#
Initialize the scheduler instance with the given parameters.
- Parameters:
parameters (dict) – The parameters of the optimizer.
- property instance#
Get the scheduler instance.
- Returns:
The scheduelr instance.
- Return type:
torch.optim.LRScheduler