Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
Mila::Dnn::ConstantLRScheduler Class Referencefinalexport

Constant learning-rate scheduler. More...

Inheritance diagram for Mila::Dnn::ConstantLRScheduler:
Collaboration diagram for Mila::Dnn::ConstantLRScheduler:

Public Member Functions

 ConstantLRScheduler (double lr)
double getLearningRate (std::size_t) const override
 Get the learning rate for the provided (zero-based) step.
std::string toString () const override
 Human-readable description of the scheduler.
Public Member Functions inherited from Mila::Dnn::LearningRateScheduler
virtual ~LearningRateScheduler ()=default

Private Attributes

double lr_

Detailed Description

Constant learning-rate scheduler.

Always returns the same learning rate.

Constructor & Destructor Documentation

◆ ConstantLRScheduler()

Mila::Dnn::ConstantLRScheduler::ConstantLRScheduler ( double lr)
inlineexplicit

Member Function Documentation

◆ getLearningRate()

double Mila::Dnn::ConstantLRScheduler::getLearningRate ( std::size_t step) const
inlineoverridevirtual

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

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

Implements Mila::Dnn::LearningRateScheduler.

◆ toString()

std::string Mila::Dnn::ConstantLRScheduler::toString ( ) const
inlineoverridevirtual

Human-readable description of the scheduler.

Implements Mila::Dnn::LearningRateScheduler.

Member Data Documentation

◆ lr_

double Mila::Dnn::ConstantLRScheduler::lr_
private

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