apply_attributes_none Subroutine

private subroutine apply_attributes_none(this, attributes)

Load ONNX attributes into none activation function

Type Bound

none_actv_type

Arguments

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

None activation type

type(onnx_attribute_type), intent(in), dimension(:) :: attributes

Array of ONNX attributes


Source Code

  subroutine apply_attributes_none(this, attributes)
    !! Load ONNX attributes into none activation function
    implicit none

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

    ! Local variables
    integer :: i
    !! Loop variable

    ! Load provided attributes
    do i=1, size(attributes,dim=1)
       select case(trim(attributes(i)%name))
       case("name")
          if(trim(attributes(i)%val) .ne. trim(this%name))then
             call print_warning( &
                  'None activation: name attribute "' // &
                  trim(attributes(i)%val) // &
                  '"" does not match expected "' // trim(this%name)//'"' &
             )

          end if
       case default
          call print_warning( &
               'None activation: unknown attribute '// &
               trim(attributes(i)%name) &
          )
       end select
    end do

  end subroutine apply_attributes_none