diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2018-11-13 12:04:25 +0000 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2018-11-15 13:43:01 +0000 |
commit | 47e6fede687a301137cef25ff729e68d099d4520 (patch) | |
tree | d4f7044fef8cd065c2378d671fc2c39e84dc19a8 /arm_compute/graph/backends/ValidateHelpers.h | |
parent | 80a2990b9e0d2eba7962e83d0e9379cd7e307c7d (diff) | |
download | ComputeLibrary-47e6fede687a301137cef25ff729e68d099d4520.tar.gz |
COMPMID-1639: Add GenerateProposals to the graph API
Change-Id: Icf813a0a87d4a07e180eafdb5fa916b2ea4028d2
Diffstat (limited to 'arm_compute/graph/backends/ValidateHelpers.h')
-rw-r--r-- | arm_compute/graph/backends/ValidateHelpers.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arm_compute/graph/backends/ValidateHelpers.h b/arm_compute/graph/backends/ValidateHelpers.h index 999ce190ab..169c795fb4 100644 --- a/arm_compute/graph/backends/ValidateHelpers.h +++ b/arm_compute/graph/backends/ValidateHelpers.h @@ -203,6 +203,33 @@ Status validate_depthwise_convolution_layer(DepthwiseConvolutionLayerNode &node) return status; } +/** Validates a Generate Proposals layer node + * + * @tparam GenerateProposalsLayer Generate Proposals layer type + * + * @param[in] node Node to validate + * + * @return Status + */ +template <typename GenerateProposalsLayer> +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 |