Build activation layer from attributes and return layer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(onnx_node_type), | intent(in) | :: | node |
ONNX node information |
||
| type(onnx_initialiser_type), | intent(in), | dimension(:) | :: | initialisers |
ONNX initialiser information |
|
| type(onnx_tensor_type), | intent(in), | dimension(:) | :: | value_info |
ONNX value info |
|
| integer, | intent(in), | optional | :: | verbose |
Verbosity level |
Instance of the activation layer
function create_from_onnx_actv_layer(node, initialisers, value_info, verbose) & result(layer) !! Build activation layer from attributes and return layer use athena__onnx_utils, only: onnx_to_athena_activation implicit none ! Arguments type(onnx_node_type), intent(in) :: node !! ONNX node information type(onnx_initialiser_type), dimension(:), intent(in) :: initialisers !! ONNX initialiser information type(onnx_tensor_type), dimension(:), intent(in) :: value_info !! ONNX value info integer, optional, intent(in) :: verbose !! Verbosity level class(base_layer_type), allocatable :: layer !! Instance of the activation layer ! Local variables integer :: verbose_ = 0 !! Verbosity level if(present(verbose)) verbose_ = verbose allocate(layer, source=actv_layer_type( & onnx_to_athena_activation(trim(node%op_type)))) call layer%build_from_onnx(node, initialisers, value_info, verbose=verbose_) end function create_from_onnx_actv_layer