emit_onnx_nodes_base Module Subroutine

module subroutine emit_onnx_nodes_base(this, prefix, nodes, num_nodes, max_nodes, inits, num_inits, max_inits, input_name, is_last_layer, format)

Default implementation: no-op (standard layers are handled by write_onnx)

Arguments

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

Instance of the layer

character(len=*), intent(in) :: prefix

Prefix for node names

type(onnx_node_type), intent(inout), dimension(:) :: nodes

ONNX nodes

integer, intent(inout) :: num_nodes

Number of ONNX nodes

integer, intent(in) :: max_nodes

Maximum number of ONNX nodes

type(onnx_initialiser_type), intent(inout), dimension(:) :: inits

ONNX initialisers

integer, intent(inout) :: num_inits

Number of ONNX initialisers

integer, intent(in) :: max_inits

Maximum number of ONNX initialisers

character(len=*), intent(in), optional :: input_name

Name of the input tensor from the previous layer

logical, intent(in), optional :: is_last_layer

Whether this is the last non-input layer

integer, intent(in), optional :: format

Export format selector


Source Code

  module subroutine emit_onnx_nodes_base( &
       this, prefix, &
       nodes, num_nodes, max_nodes, &
       inits, num_inits, max_inits, &
       input_name, is_last_layer, format &
  )
    !! Default implementation: no-op (standard layers are handled by write_onnx)
    implicit none

    ! Arguments
    class(base_layer_type), intent(in) :: this
    !! Instance of the layer
    character(*), intent(in) :: prefix
    !! Prefix for node names
    type(onnx_node_type), intent(inout), dimension(:) :: nodes
    !! ONNX nodes
    integer, intent(inout) :: num_nodes
    !! Number of ONNX nodes
    integer, intent(in) :: max_nodes
    !! Maximum number of ONNX nodes
    type(onnx_initialiser_type), intent(inout), dimension(:) :: inits
    !! ONNX initialisers
    integer, intent(inout) :: num_inits
    !! Number of ONNX initialisers
    integer, intent(in) :: max_inits
    !! Maximum number of ONNX initialisers
    character(*), optional, intent(in) :: input_name
    !! Name of the input tensor from the previous layer
    logical, optional, intent(in) :: is_last_layer
    !! Whether this is the last non-input layer
    integer, optional, intent(in) :: format
    !! Export format selector

    ! Default: do nothing. Standard layers are handled directly by write_onnx.
  end subroutine emit_onnx_nodes_base