athena__initialiser_gaussian Module

Module containing the Gaussian initialisation

This module contains the implementation of the Gaussian initialisation for the weights and biases of a layer


Uses


Interfaces

public interface gaussian_init_type

  • private module function initialiser_gaussian_type(name) result(initialiser)

    Interface for the Gaussian initialiser

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in), optional :: name

    Name of the initialiser

    Return Value type(gaussian_init_type)

    Gaussian initialiser object


Derived Types

type, public, extends(base_init_type) ::  gaussian_init_type

Type for the Gaussian initialiser

Components

Type Visibility Attributes Name Initial
real(kind=real32), public :: mean = 1._real32

Scale, mean, and standard deviation of the initialiser

character(len=20), public :: name

Name of the initialiser

real(kind=real32), public :: scale = 1._real32

Scale, mean, and standard deviation of the initialiser

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

Scale, mean, and standard deviation of the initialiser

Constructor

private module function initialiser_gaussian_type (name)

Interface for the Gaussian initialiser

Type-Bound Procedures

procedure, public, pass(this) :: initialise => gaussian_initialise

Initialise the weights and biases using the Gaussian distribution


Functions

private module function initialiser_gaussian_type(name) result(initialiser)

Interface for the Gaussian initialiser

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in), optional :: name

Name of the initialiser

Return Value type(gaussian_init_type)

Gaussian initialiser object


Subroutines

private subroutine gaussian_initialise(this, input, fan_in, fan_out, spacing)

Initialise the weights and biases using the Gaussian distribution

Arguments

Type IntentOptional Attributes Name
class(gaussian_init_type), intent(inout) :: this

Instance of the Gaussian initialiser

real(kind=real32), intent(out), dimension(..) :: input

Weights and biases to initialise

integer, intent(in), optional :: fan_in

Number of input and output parameters

integer, intent(in), optional :: fan_out

Number of input and output parameters

integer, intent(in), optional, dimension(:) :: spacing

Spacing of the input and output units