From 5209be567a0a7df4d205d3dc2b971b8f03964593 Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Wed, 13 Feb 2019 16:34:56 +0000 Subject: COMPMID-1999: Add support for GenerateProposals operator in CL Change-Id: Ie08a6874347085f96b00f25bdb605eee7d683c25 Signed-off-by: giuros01 Reviewed-on: https://review.mlplatform.org/719 Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas Reviewed-by: Michalis Spyrou --- arm_compute/graph/backends/ValidateHelpers.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 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 1b06f31bed..8942be2da8 100644 --- a/arm_compute/graph/backends/ValidateHelpers.h +++ b/arm_compute/graph/backends/ValidateHelpers.h @@ -228,6 +228,33 @@ Status validate_detection_output_layer(DetectionOutputLayerNode &node) return DetectionOutputLayer::validate(input0, input1, input2, output, detect_info); } +/** Validates a Generate Proposals layer node + * + * @tparam GenerateProposalsLayer Generate Proposals layer type + * + * @param[in] node Node to validate + * + * @return Status + */ +template +Status validate_generate_proposals_layer(GenerateProposalsLayerNode &node) +{ + ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating GenerateProposalsLayer 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() != 3); + + // Extract IO and info + arm_compute::ITensorInfo *scores = detail::get_backing_tensor_info(node.input(0)); + arm_compute::ITensorInfo *deltas = detail::get_backing_tensor_info(node.input(1)); + arm_compute::ITensorInfo *anchors = detail::get_backing_tensor_info(node.input(2)); + arm_compute::ITensorInfo *proposals = get_backing_tensor_info(node.output(0)); + arm_compute::ITensorInfo *scores_out = get_backing_tensor_info(node.output(1)); + arm_compute::ITensorInfo *num_valid_proposals = get_backing_tensor_info(node.output(2)); + const GenerateProposalsInfo info = node.info(); + + return GenerateProposalsLayer::validate(scores, deltas, anchors, proposals, scores_out, num_valid_proposals, info); +} + /** Validates a NormalizePlanarYUV layer node * * @tparam NormalizePlanarYUVLayer layer type -- cgit v1.2.1