Export leaky ReLU activation function attributes as ONNX attributes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(leaky_relu_actv_type), | intent(in) | :: | this |
Leaky ReLU activation type |
Array of ONNX attributes
pure function export_attributes_leaky_relu(this) result(attributes) !! Export leaky ReLU activation function attributes as ONNX attributes implicit none ! Arguments class(leaky_relu_actv_type), intent(in) :: this !! Leaky ReLU activation type type(onnx_attribute_type), allocatable, dimension(:) :: attributes !! Array of ONNX attributes ! Local variables character(50) :: buffer !! Temporary string buffer allocate(attributes(3)) write(buffer, '(A)') this%name attributes(1) = onnx_attribute_type( & "name", "string", trim(adjustl(buffer)) ) write(buffer, '(F10.6)') this%scale attributes(2) = onnx_attribute_type( & "scale", "float", trim(adjustl(buffer)) ) write(buffer, '(F10.6)') this%alpha attributes(3) = onnx_attribute_type( & "alpha", "float", trim(adjustl(buffer)) ) end function export_attributes_leaky_relu