From 7234ed8c3d07c76963eb3bce9530994421ad7e67 Mon Sep 17 00:00:00 2001 From: Isabella Gottardi Date: Tue, 27 Nov 2018 08:51:10 +0000 Subject: COMPMID-1808: Add Detection Output Layer to the GraphAPI COMPMID-1710: Integrate Detection ouput in MobilenetSSD graph example Change-Id: I384d1eb492ef14ece58f2023ad7bbc16f834450b Reviewed-on: https://review.mlplatform.org/356 Tested-by: Arm Jenkins Reviewed-by: Pablo Marquez Reviewed-by: Georgios Pinitas --- arm_compute/graph/backends/ValidateHelpers.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'arm_compute/graph/backends/ValidateHelpers.h') diff --git a/arm_compute/graph/backends/ValidateHelpers.h b/arm_compute/graph/backends/ValidateHelpers.h index 75e2363f82..f1e53613ab 100644 --- a/arm_compute/graph/backends/ValidateHelpers.h +++ b/arm_compute/graph/backends/ValidateHelpers.h @@ -203,6 +203,30 @@ Status validate_depthwise_convolution_layer(DepthwiseConvolutionLayerNode &node) return status; } +/** Validates a detection output layer node + * + * @tparam DetectionOutputLayer DetectionOutput layer type + * + * @param[in] node Node to validate + * + * @return Status + */ +template +Status validate_detection_output_layer(DetectionOutputLayerNode &node) +{ + ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating DetectionOutputLayer node with ID : " << node.id() << " and Name: " << node.name() << std::endl); + ARM_COMPUTE_RETURN_ERROR_ON(node.num_inputs() != 3); + ARM_COMPUTE_RETURN_ERROR_ON(node.num_outputs() != 1); + + // Extract IO and info + arm_compute::ITensorInfo *input0 = get_backing_tensor_info(node.input(0)); + arm_compute::ITensorInfo *input1 = get_backing_tensor_info(node.input(1)); + arm_compute::ITensorInfo *input2 = get_backing_tensor_info(node.input(2)); + arm_compute::ITensorInfo *output = get_backing_tensor_info(node.output(0)); + const DetectionOutputLayerInfo detect_info = node.detection_output_info(); + + return DetectionOutputLayer::validate(input0, input1, input2, output, detect_info); +} /** Validates a Generate Proposals layer node * -- cgit v1.2.1