athena__activation Module

Module containing the activation function setup



Variables

Type Visibility Attributes Name Initial
type(onnx_create_actv_container), public, dimension(:), allocatable :: list_of_onnx_activation_creators

List of activation names and their associated ONNX creation functions


Interfaces

interface

  • private module function create_from_onnx_activation(attributes) result(activation)

    Function to create an activation function from ONNX attributes

    Arguments

    Type IntentOptional Attributes Name
    type(onnx_attribute_type), intent(in), dimension(:) :: attributes

    Array of ONNX attributes

    Return Value class(base_actv_type), allocatable

    Resulting activation function


Derived Types

type, private ::  onnx_create_actv_container

Type containing information needed to create an activation from ONNX

Components

Type Visibility Attributes Name Initial
procedure(create_from_onnx_activation), public, nopass, pointer :: create_ptr => null()

Pointer to the specific activation creation function

character(len=20), public :: name

Name of the layer


Functions

public function activation_setup(input, error) result(activation)

Setup the desired activation function

Arguments

Type IntentOptional Attributes Name
class(*), intent(in) :: input

Name of the activation function or activation object

integer, intent(out), optional :: error

Error code

Return Value class(base_actv_type), allocatable

Activation function object

public function read_activation(unit, iline) result(activation)

Read activation function from input file

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: unit

Unit number for input file

integer, intent(inout), optional :: iline

Line number

Return Value class(base_actv_type), allocatable

Activation function object

private function read_activation_attributes(unit, iline) result(attributes)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: unit

Unit number for input file

integer, intent(inout), optional :: iline

Indicator for inline reading

Return Value type(onnx_attribute_type), allocatable, dimension(:)

Array of ONNX attributes


Subroutines

public subroutine allocate_list_of_onnx_activation_creators(addit_list)

Allocate and populate the list of ONNX activation creation functions

Arguments

Type IntentOptional Attributes Name
type(onnx_create_actv_container), intent(in), optional, dimension(:) :: addit_list