apply_none Function

private function apply_none(this, val) result(output)

Apply identity activation to 1D array

Simply returns scaled input: f = scale * x

Type Bound

none_actv_type

Arguments

Type IntentOptional Attributes Name
class(none_actv_type), intent(in) :: this

None activation type

type(array_type), intent(in) :: val

Input values

Return Value type(array_type), pointer

Scaled output values


Source Code

  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