Apply identity activation to 1D array
Simply returns scaled input: f = scale * x
| 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
function apply_none(this, val) result(output) !! Apply identity activation to 1D array !! !! Simply returns scaled input: f = scale * x implicit none ! Arguments class(none_actv_type), intent(in) :: this !! None activation type type(array_type), intent(in) :: val !! Input values type(array_type), pointer :: output !! Scaled output values output => val * 1._real32 ! multiplication by 1 to ensure new allocation end function apply_none