classify_kipf_onnx_expanded_gnn Function

public function classify_kipf_onnx_expanded_gnn(prefix, nodes, num_nodes) result(is_kipf)

Return true when the expanded-ONNX node cluster for prefix is a Kipf GCN layer.

Kipf layers have Pow nodes for D^{-1/2} normalisation (named {prefix}_t1_pow_coeff).

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: prefix

Layer prefix (e.g. "node_2")

type(onnx_node_type), intent(in) :: nodes(:)

Parsed ONNX nodes

integer, intent(in) :: num_nodes

Number of valid node entries

Return Value logical

Return value: true when the cluster matches the Kipf GCN pattern


Source Code

  function classify_kipf_onnx_expanded_gnn( &
       prefix, nodes, num_nodes) result(is_kipf)
    !! Return true when the expanded-ONNX node cluster
    !! for prefix is a Kipf GCN layer.
    !!
    !! Kipf layers have Pow nodes for D^{-1/2} normalisation
    !! (named {prefix}_t1_pow_coeff).
    implicit none

    ! Arguments
    character(*), intent(in) :: prefix
    !! Layer prefix (e.g. "node_2")
    type(onnx_node_type), intent(in) :: nodes(:)
    !! Parsed ONNX nodes
    integer, intent(in) :: num_nodes
    !! Number of valid node entries

    logical :: is_kipf
    !! Return value: true when the cluster matches the Kipf GCN pattern


    is_kipf = &
         find_gnn_node(nodes, num_nodes, &
              trim(prefix)//'_t1_pow_coeff') &
         .gt. 0

  end function classify_kipf_onnx_expanded_gnn