athena__learning_rate_decay Module

Module containing learning decay rate types and procedures


Uses

    • coreutils

Interfaces

public interface base_lr_decay_type

Interface for base learning rate decay type

  • private module function setup_lr_decay_base() result(lr_decay)

    Set up base learning rate decay type

    Arguments

    None

    Return Value type(base_lr_decay_type)

    Base learning rate decay type

public interface exp_lr_decay_type

Interface for exponential learning rate decay type

  • private module function setup_lr_decay_exp(decay_rate) result(lr_decay)

    Set up exponential learning rate decay type

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real32), intent(in), optional :: decay_rate

    Decay rate for learning rate

    Return Value type(exp_lr_decay_type)

    Exponential learning rate decay type

public interface inv_lr_decay_type

Interface for inverse learning rate decay type

  • private module function setup_lr_decay_inv(decay_rate, decay_power) result(lr_decay)

    Set up inverse learning rate decay type

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real32), intent(in), optional :: decay_rate

    Decay rate for learning rate

    real(kind=real32), intent(in), optional :: decay_power

    Decay rate for learning rate

    Return Value type(inv_lr_decay_type)

    Inverse learning rate decay type

public interface step_lr_decay_type

Interface for step learning rate decay type

  • private module function setup_lr_decay_step(decay_rate, decay_steps) result(lr_decay)

    Set up step learning rate decay type

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real32), intent(in), optional :: decay_rate

    Decay rate for learning rate

    integer, intent(in), optional :: decay_steps

    Number of steps for learning rate decay

    Return Value type(step_lr_decay_type)

    Step learning rate decay type


Derived Types

type, public ::  base_lr_decay_type

Type for learning rate decay

Components

Type Visibility Attributes Name Initial
real(kind=real32), public :: decay_rate

Decay rate for learning rate

real(kind=real32), public :: initial_learning_rate

Initial learning rate

logical, public :: iterate_per_epoch = .false.

Whether to iterate learning rate decay per epoch

character(len=20), public :: name

Name of the learning rate decay type

Constructor

Interface for base learning rate decay type

private module function setup_lr_decay_base ()

Set up base learning rate decay type

Type-Bound Procedures

procedure, public :: get_lr => lr_decay_none

Procedure to get the learning rate

type, public, extends(base_lr_decay_type) ::  exp_lr_decay_type

Type for exponential learning rate decay

Components

Type Visibility Attributes Name Initial
real(kind=real32), public :: decay_rate

Decay rate for learning rate

real(kind=real32), public :: initial_learning_rate

Initial learning rate

logical, public :: iterate_per_epoch = .false.

Whether to iterate learning rate decay per epoch

character(len=20), public :: name

Name of the learning rate decay type

Constructor

Interface for exponential learning rate decay type

private module function setup_lr_decay_exp (decay_rate)

Set up exponential learning rate decay type

Type-Bound Procedures

procedure, public :: get_lr => lr_decay_exp

Procedure to get the learning rate

type, public, extends(base_lr_decay_type) ::  inv_lr_decay_type

Type for inverse learning rate decay

Components

Type Visibility Attributes Name Initial
real(kind=real32), public :: decay_power

Power for learning rate decay

real(kind=real32), public :: decay_rate

Decay rate for learning rate

real(kind=real32), public :: initial_learning_rate

Initial learning rate

logical, public :: iterate_per_epoch = .false.

Whether to iterate learning rate decay per epoch

character(len=20), public :: name

Name of the learning rate decay type

Constructor

Interface for inverse learning rate decay type

private module function setup_lr_decay_inv (decay_rate, decay_power)

Set up inverse learning rate decay type

Type-Bound Procedures

procedure, public :: get_lr => lr_decay_inv

Procedure to get the learning rate

type, public, extends(base_lr_decay_type) ::  step_lr_decay_type

Type for step learning rate decay

Components

Type Visibility Attributes Name Initial
real(kind=real32), public :: decay_rate

Decay rate for learning rate

integer, public :: decay_steps

Number of steps for learning rate decay

real(kind=real32), public :: initial_learning_rate

Initial learning rate

logical, public :: iterate_per_epoch = .false.

Whether to iterate learning rate decay per epoch

character(len=20), public :: name

Name of the learning rate decay type

Constructor

Interface for step learning rate decay type

private module function setup_lr_decay_step (decay_rate, decay_steps)

Set up step learning rate decay type

Type-Bound Procedures

procedure, public :: get_lr => lr_decay_step

Procedure to get the learning rate


Functions

private pure function lr_decay_exp(this, learning_rate, iteration) result(output)

Get the learning rate for the exponential decay type

Arguments

Type IntentOptional Attributes Name
class(exp_lr_decay_type), intent(in) :: this

Instance of the exponential learning rate decay type

real(kind=real32), intent(in) :: learning_rate

Initial learning rate

integer, intent(in) :: iteration

Iteration number

Return Value real(kind=real32)

Learning rate

private pure function lr_decay_inv(this, learning_rate, iteration) result(output)

Get the learning rate for the inverse decay type

Arguments

Type IntentOptional Attributes Name
class(inv_lr_decay_type), intent(in) :: this

Instance of the inverse learning rate decay type

real(kind=real32), intent(in) :: learning_rate

Initial learning rate

integer, intent(in) :: iteration

Iteration number

Return Value real(kind=real32)

Learning rate

private pure function lr_decay_none(this, learning_rate, iteration) result(output)

Get the learning rate for the base decay type

Arguments

Type IntentOptional Attributes Name
class(base_lr_decay_type), intent(in) :: this

Instance of the base learning rate decay type

real(kind=real32), intent(in) :: learning_rate

Initial learning rate

integer, intent(in) :: iteration

Iteration number

Return Value real(kind=real32)

Learning rate

private pure function lr_decay_step(this, learning_rate, iteration) result(output)

Get the learning rate for the step decay type

Arguments

Type IntentOptional Attributes Name
class(step_lr_decay_type), intent(in) :: this

Instance of the step learning rate decay type

real(kind=real32), intent(in) :: learning_rate

Initial learning rate

integer, intent(in) :: iteration

Iteration number

Return Value real(kind=real32)

Learning rate

private module function setup_lr_decay_base() result(lr_decay)

Set up base learning rate decay type

Arguments

None

Return Value type(base_lr_decay_type)

Instance of the base learning rate decay type

private module function setup_lr_decay_exp(decay_rate) result(lr_decay)

Set up exponential learning rate decay type

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in), optional :: decay_rate

Decay rate for learning rate

Return Value type(exp_lr_decay_type)

Exponential learning rate decay type

private module function setup_lr_decay_inv(decay_rate, decay_power) result(lr_decay)

Set up inverse learning rate decay type

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in), optional :: decay_rate

Decay rate for learning rate

real(kind=real32), intent(in), optional :: decay_power

Decay rate for learning rate

Return Value type(inv_lr_decay_type)

Inverse learning rate decay type

private module function setup_lr_decay_step(decay_rate, decay_steps) result(lr_decay)

Set up step learning rate decay type

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in), optional :: decay_rate

Decay rate for learning rate

integer, intent(in), optional :: decay_steps

Number of steps for learning rate decay

Return Value type(step_lr_decay_type)

Step learning rate decay type