Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
Mila::Dnn::LearningRateScheduler Class Referenceabstractexport

Abstract base for learning-rate schedulers. More...

Inheritance diagram for Mila::Dnn::LearningRateScheduler:

Public Member Functions

virtual ~LearningRateScheduler ()=default
virtual double getLearningRate (std::size_t step) const =0
 Get the learning rate for the provided (zero-based) step.
virtual std::string toString () const =0
 Human-readable description of the scheduler.

Detailed Description

Abstract base for learning-rate schedulers.

Implementations compute a scalar learning rate for a given step index. The step argument is a zero-based iteration/step count. Implementations must be thread-safe for concurrent const calls.

Constructor & Destructor Documentation

◆ ~LearningRateScheduler()

virtual Mila::Dnn::LearningRateScheduler::~LearningRateScheduler ( )
virtualdefault

Member Function Documentation

◆ getLearningRate()

virtual double Mila::Dnn::LearningRateScheduler::getLearningRate ( std::size_t step) const
pure virtual

Get the learning rate for the provided (zero-based) step.

Parameters
stepZero-based step index.
Returns
Scalar learning rate to use at this step.

Implemented in Mila::Dnn::ConstantLRScheduler, Mila::Dnn::CosineLRScheduler, and Mila::Dnn::LinearLRScheduler.

◆ toString()

virtual std::string Mila::Dnn::LearningRateScheduler::toString ( ) const
pure virtual

Human-readable description of the scheduler.

Implemented in Mila::Dnn::ConstantLRScheduler, Mila::Dnn::CosineLRScheduler, and Mila::Dnn::LinearLRScheduler.


The documentation for this class was generated from the following file: