diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2018-09-12 17:44:08 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | c30b668bf7b3e7f841ea8ef9295f43fc69519e15 (patch) | |
tree | bc83c9b8bb0893cae23780907b6cf370b721d7b3 /arm_compute/graph/backends/ValidateHelpers.h | |
parent | 17220e2eb49e75b85f2b802489a44b8019997c25 (diff) | |
download | ComputeLibrary-c30b668bf7b3e7f841ea8ef9295f43fc69519e15.tar.gz |
COMPMID-1576: Add SliceLayer to graph API
Change-Id: I42260cc529ca7721e221d3d0576b1668e09f8307
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/148255
Tested-by: bsgcomp <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/graph/backends/ValidateHelpers.h')
-rw-r--r-- | arm_compute/graph/backends/ValidateHelpers.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arm_compute/graph/backends/ValidateHelpers.h b/arm_compute/graph/backends/ValidateHelpers.h index eb3762571d..2dc349174d 100644 --- a/arm_compute/graph/backends/ValidateHelpers.h +++ b/arm_compute/graph/backends/ValidateHelpers.h @@ -249,6 +249,30 @@ Status validate_reorg_layer(ReorgLayerNode &node) return ReorgLayer::validate(input, output, node.stride()); } +/** Validates a Slice layer node + * + * @tparam SliceLayer Slice layer function type + * + * @param[in] node Node to validate + * + * @return Status + */ +template <typename SliceLayer> +Status validate_slice_layer(SliceLayerNode &node) +{ + ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating Slice node with ID : " << node.id() << " and Name: " << node.name() << std::endl); + ARM_COMPUTE_RETURN_ERROR_ON(node.num_inputs() != 1); + ARM_COMPUTE_RETURN_ERROR_ON(node.num_outputs() != 1); + + // Extract IO and info + arm_compute::ITensorInfo *input = get_backing_tensor_info(node.input(0)); + arm_compute::ITensorInfo *output = get_backing_tensor_info(node.output(0)); + const Coordinates starts = node.starts(); + const Coordinates ends = node.ends(); + + return SliceLayer::validate(input, output, starts, ends); +} + /** Validates a YOLO layer node * * @tparam YOLOLayer YOLO layer type |