Return list of dynamic LNO attributes for ONNX export
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dynamic_lno_layer_type), | intent(in) | :: | this |
Instance of the dynamic LNO layer |
List of attributes for ONNX export
function get_attributes_dynamic_lno(this) result(attributes) !! Return list of dynamic LNO attributes for ONNX export implicit none ! Arguments class(dynamic_lno_layer_type), intent(in) :: this !! Instance of the dynamic LNO layer type(onnx_attribute_type), allocatable, dimension(:) :: attributes !! List of attributes for ONNX export ! Local variables character(32) :: buffer !! Buffer for integer-to-string conversion allocate(attributes(5)) write(buffer, '(I0)') this%num_inputs attributes(1) = onnx_attribute_type( & name='num_inputs', type='int', val=trim(buffer)) write(buffer, '(I0)') this%num_outputs attributes(2) = onnx_attribute_type( & name='num_outputs', type='int', val=trim(buffer)) write(buffer, '(I0)') this%num_modes attributes(3) = onnx_attribute_type( & name='num_modes', type='int', val=trim(buffer)) if(this%use_bias)then buffer = '1' else buffer = '0' end if attributes(4) = onnx_attribute_type( & name='use_bias', type='int', val=trim(buffer)) attributes(5) = onnx_attribute_type( & name='activation', type='string', val=trim(this%activation%name)) end function get_attributes_dynamic_lno