athena__regulariser Module

Module containing regularisation methods

This module contains regularisation methods to prevent overfitting in neural networks


Uses

    • coreutils

Abstract Interfaces

abstract interface

  • private pure subroutine regularise(this, params, gradient, learning_rate)

    Regularise the parameters

    Arguments

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

    Regulariser object

    real(kind=real32), intent(in), dimension(:) :: params

    Parameters to regularise

    real(kind=real32), intent(inout), dimension(:) :: gradient

    Gradient of the parameters

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

    Learning rate


Derived Types

type, public, abstract ::  base_regulariser_type

Abstract type for regularisation

Type-Bound Procedures

procedure(regularise), public, deferred, pass(this) :: regularise

Regularisation method

type, public, extends(base_regulariser_type) ::  l1_regulariser_type

Type for L1 regularisation

Read more…

Components

Type Visibility Attributes Name Initial
real(kind=real32), public :: l1 = 0.01_real32

Type-Bound Procedures

procedure, public, pass(this) :: regularise => regularise_l1

Regularisation method

type, public, extends(base_regulariser_type) ::  l1l2_regulariser_type

Type for L1 and L2 regularisation

Components

Type Visibility Attributes Name Initial
real(kind=real32), public :: l1 = 0.01_real32

L1 regularisation parameter

real(kind=real32), public :: l2 = 0.01_real32

L2 regularisation parameter

Type-Bound Procedures

procedure, public, pass(this) :: regularise => regularise_l1l2

Regularisation method

type, public, extends(base_regulariser_type) ::  l2_regulariser_type

Type for L2 regularisation

Read more…

Components

Type Visibility Attributes Name Initial
logical, public :: decoupled = .true.

Use decoupled weight decay regularisation

real(kind=real32), public :: l2 = 0.01_real32

Regularisation parameter

real(kind=real32), public :: l2_decoupled = 0.01_real32

Decoupled weight decay regularisation parameter

Type-Bound Procedures

procedure, public, pass(this) :: regularise => regularise_l2

Regularisation method


Subroutines

private pure subroutine regularise_l1(this, params, gradient, learning_rate)

Regularise the parameters using L1 regularisation

Arguments

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

Instance of the L1 regulariser

real(kind=real32), intent(in), dimension(:) :: params

Parameters to regularise

real(kind=real32), intent(inout), dimension(:) :: gradient

Gradient of the parameters

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

Learning rate

private pure subroutine regularise_l1l2(this, params, gradient, learning_rate)

Regularise the parameters using L1 and L2 regularisation

Arguments

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

Instance of the L1 and L2 regulariser

real(kind=real32), intent(in), dimension(:) :: params

Parameters to regularise

real(kind=real32), intent(inout), dimension(:) :: gradient

Gradient of the parameters

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

Learning rate

private pure subroutine regularise_l2(this, params, gradient, learning_rate)

Regularise the parameters using L2 regularisation

Arguments

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

Instance of the L2 regulariser

real(kind=real32), intent(in), dimension(:) :: params

Parameters to regularise

real(kind=real32), intent(inout), dimension(:) :: gradient

Gradient of the parameters

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

Learning rate