Module containing implementation of the Gaussian activation function
This module implements the Gaussian (bell curve) activation, which produces maximum activation at the origin.
Mathematical operation:
Derivative:
Properties: Smooth, symmetric, max at Used in Radial Basis Function (RBF) networks Responds strongly to inputs near
Initialise a Gaussian activation function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | optional | :: | scale |
Optional scale factor for activation output |
|
| real(kind=real32), | intent(in), | optional | :: | sigma |
Optional standard deviation parameter |
|
| real(kind=real32), | intent(in), | optional | :: | mu |
Optional mean parameter |
|
| type(onnx_attribute_type), | intent(in), | optional, | dimension(:) | :: | attributes |
Optional array of ONNX attributes |
Gaussian activation type
Type for Gaussian activation function with overloaded procedures
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | apply_scaling | = | .false. |
Boolean to apply scaling or not |
|
| real(kind=real32), | public | :: | mu |
Mean parameter for Gaussian function |
|||
| character(len=10), | public | :: | name |
Name of the activation function |
|||
| real(kind=real32), | public | :: | scale | = | 1._real32 |
Scale of the activation function |
|
| real(kind=real32), | public | :: | sigma |
Standard deviation parameter for Gaussian function |
|||
| real(kind=real32), | public | :: | threshold |
Threshold of the activation function |
| private function initialise (scale, sigma, mu, attributes) | Initialise a Gaussian activation function |
| procedure, public, pass(this) :: apply => apply_gaussian | |
| procedure, public, pass(this) :: apply_attributes => apply_attributes_gaussian | |
| procedure, public, pass(this) :: export_attributes => export_attributes_gaussian | |
| procedure, public, pass(this) :: print_to_unit => print_to_unit_actv | |
| procedure, public, pass(this) :: reset => reset_gaussian |
Create Gaussian activation function from ONNX attributes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(onnx_attribute_type), | intent(in), | dimension(:) | :: | attributes |
Array of ONNX attributes |
Instance of activation type
Apply Gaussian activation to array
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(gaussian_actv_type), | intent(in) | :: | this |
Gaussian activation type containing sigma parameter |
||
| type(array_type), | intent(in) | :: | val |
Input values |
Gaussian activated output values
Export Gaussian activation function attributes as ONNX attributes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(gaussian_actv_type), | intent(in) | :: | this |
Gaussian activation type |
Array of ONNX attributes
Initialise a Gaussian activation function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | optional | :: | scale |
Optional scale factor for activation output |
|
| real(kind=real32), | intent(in), | optional | :: | sigma |
Optional standard deviation parameter |
|
| real(kind=real32), | intent(in), | optional | :: | mu |
Optional mean parameter |
|
| type(onnx_attribute_type), | intent(in), | optional, | dimension(:) | :: | attributes |
Optional array of ONNX attributes |
Gaussian activation type
Load ONNX attributes into Gaussian activation function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(gaussian_actv_type), | intent(inout) | :: | this |
Gaussian activation type |
||
| type(onnx_attribute_type), | intent(in), | dimension(:) | :: | attributes |
Array of ONNX attributes |
Reset Gaussian activation function attributes and variables
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(gaussian_actv_type), | intent(inout) | :: | this |
Gaussian activation type |