Compute Library
 22.05
NENodeValidator Class Referencefinal

#include <NENodeValidator.h>

Static Public Member Functions

static Status validate (INode *node)
 Validate a node. More...
 

Detailed Description

Definition at line 38 of file NENodeValidator.h.

Member Function Documentation

◆ validate()

Status validate ( INode node)
static

Validate a node.

Parameters
[in]nodeNode to validate
Returns
An error status

Definition at line 57 of file NENodeValidator.cpp.

References ARM_COMPUTE_CREATE_ERROR, arm_compute::RUNTIME_ERROR, INode::type(), type, and arm_compute::graph::backends::detail::validate_convolution_layer().

Referenced by NEDeviceBackend::validate_node().

58 {
59  if(node == nullptr)
60  {
61  return Status{};
62  }
63 
64  NodeType type = node->type();
65  switch(type)
66  {
68  return detail::validate_arg_min_max_layer<NEArgMinMaxLayer>(*polymorphic_downcast<ArgMinMaxLayerNode *>(node));
70  return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : BoundingBoxTransformLayer");
72  return detail::validate_channel_shuffle_layer<NEChannelShuffleLayer>(*polymorphic_downcast<ChannelShuffleLayerNode *>(node));
74  return detail::validate_convolution_layer<NEConvolutionLayer,
75  NEDirectConvolutionLayer,
76  NEGEMMConvolutionLayer,
77  NEWinogradConvolutionLayer>(*polymorphic_downcast<ConvolutionLayerNode *>(node));
79  return detail::validate_depth_to_space_layer<NEDepthToSpaceLayer>(*polymorphic_downcast<DepthToSpaceLayerNode *>(node));
81  return detail::validate_depthwise_convolution_layer<NEDepthwiseConvolutionLayer>(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node));
83  return detail::validate_dequantization_layer<NEDequantizationLayer>(*polymorphic_downcast<DequantizationLayerNode *>(node));
85  return detail::validate_detection_output_layer<CPPDetectionOutputLayer>(*polymorphic_downcast<DetectionOutputLayerNode *>(node));
87  return detail::validate_detection_post_process_layer<NEDetectionPostProcessLayer>(*polymorphic_downcast<DetectionPostProcessLayerNode *>(node));
89  return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : GenerateProposalsLayer");
91  return detail::validate_l2_normalize_layer<NEL2NormalizeLayer>(*polymorphic_downcast<L2NormalizeLayerNode *>(node));
93  return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : NormalizePlanarYUVLayer");
94  case NodeType::PadLayer:
95  return detail::validate_pad_layer<NEPadLayer>(*polymorphic_downcast<PadLayerNode *>(node));
97  return detail::validate_permute_layer<NEPermute>(*polymorphic_downcast<PermuteLayerNode *>(node));
99  return detail::validate_prelu_layer<NEPReluLayer>(*polymorphic_downcast<PReluLayerNode *>(node));
101  return detail::validate_priorbox_layer<NEPriorBoxLayer>(*polymorphic_downcast<PriorBoxLayerNode *>(node));
103  return detail::validate_quantization_layer<NEQuantizationLayer>(*polymorphic_downcast<QuantizationLayerNode *>(node));
105  return detail::validate_reduction_operation_layer<NEReductionOperation>(*polymorphic_downcast<ReductionLayerNode *>(node));
107  return detail::validate_reorg_layer<NEReorgLayer>(*polymorphic_downcast<ReorgLayerNode *>(node));
109  return detail::validate_reshape_layer<NEReshapeLayer>(*polymorphic_downcast<ReshapeLayerNode *>(node));
111  return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : ROIAlignLayer");
113  return detail::validate_slice_layer<NESlice>(*polymorphic_downcast<SliceLayerNode *>(node));
115  return detail::validate_strided_slice_layer<NEStridedSlice>(*polymorphic_downcast<StridedSliceLayerNode *>(node));
117  return detail::validate_eltwise_Layer<NEEltwiseLayerFunctions>(*polymorphic_downcast<EltwiseLayerNode *>(node));
119  return detail::validate_unary_eltwise_layer<NEUnaryEltwiseLayerFunctions>(*polymorphic_downcast<UnaryEltwiseLayerNode *>(node));
120  default:
121  return Status{};
122  }
123 }
decltype(strategy::transforms) typedef type
NodeType
Supported nodes.
Definition: Types.h:199
#define ARM_COMPUTE_CREATE_ERROR(error_code, msg)
Creates an error with a given message.
Definition: Error.h:159
Status validate_convolution_layer(ConvolutionLayerNode &node)
Validates a Convolution layer node.

The documentation for this class was generated from the following files: