Module containing implementation of no activation function (identity)
This module implements the identity function (no activation).
Mathematical operation:
Derivative:
Properties: Preserves input as-is, linear transformation Used for regression outputs or when no non-linearity is desired
Initialise a none (no-op) activation function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(onnx_attribute_type), | intent(in), | optional, | dimension(:) | :: | attributes |
Optional array of ONNX attributes |
None activation type
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | apply_scaling | = | .false. |
Boolean to apply scaling or not |
|
| 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 | :: | threshold |
Threshold of the activation function |
| private function initialise (attributes) | Initialise a none (no-op) activation function |
| procedure, public, pass(this) :: apply => apply_none | |
| procedure, public, pass(this) :: apply_attributes => apply_attributes_none | |
| procedure, public, pass(this) :: export_attributes => export_attributes_none | |
| procedure, public, pass(this) :: print_to_unit => print_to_unit_actv | |
| procedure, public, pass(this) :: reset => reset_none |
Create none 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 identity activation to 1D array
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(none_actv_type), | intent(in) | :: | this |
None activation type |
||
| type(array_type), | intent(in) | :: | val |
Input values |
Scaled output values
Export none activation function attributes as ONNX attributes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(none_actv_type), | intent(in) | :: | this |
None activation type |
Array of ONNX attributes
Initialise a none (no-op) activation function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(onnx_attribute_type), | intent(in), | optional, | dimension(:) | :: | attributes |
Optional array of ONNX attributes |
None activation type
Load ONNX attributes into none activation function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(none_actv_type), | intent(inout) | :: | this |
None activation type |
||
| type(onnx_attribute_type), | intent(in), | dimension(:) | :: | attributes |
Array of ONNX attributes |
Reset none activation function attributes and variables
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(none_actv_type), | intent(inout) | :: | this |
None activation type |