export_attributes_none Function

private pure function export_attributes_none(this) result(attributes)

Export none activation function attributes as ONNX attributes

Type Bound

none_actv_type

Arguments

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

None activation type

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

Array of ONNX attributes


Source Code

  pure function export_attributes_none(this) result(attributes)
    !! Export none activation function attributes as ONNX attributes
    implicit none

    ! Arguments
    class(none_actv_type), intent(in) :: this
    !! None activation type
    type(onnx_attribute_type), allocatable, dimension(:) :: attributes
    !! Array of ONNX attributes

    ! Local variables
    character(50) :: buffer
    !! Temporary string buffer

    ! No attributes for none activation
    allocate(attributes(1))

    write(buffer, '(A)') this%name
    attributes(1) = onnx_attribute_type( &
         "name", "string", trim(adjustl(buffer)) )

  end function export_attributes_none