aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/backends/ValidateHelpers.h
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2018-09-13 11:39:28 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit96f6769de9d9ebe3e631b81aac9a82934a79b0c4 (patch)
treeeaf3efea9eb89b05d1aecfc7d64b3cf89b3cdc57 /arm_compute/graph/backends/ValidateHelpers.h
parent8e1f3c0685a4a0413c6d57a3254b5d59949ec255 (diff)
downloadComputeLibrary-96f6769de9d9ebe3e631b81aac9a82934a79b0c4.tar.gz
COMPMID-1582 Add YOLOLayer to graph API
Change-Id: I8eb7cf220f038b0ac70cb3df1f399a3b66bbca1b Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/148245 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: bsgcomp <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/graph/backends/ValidateHelpers.h')
-rw-r--r--arm_compute/graph/backends/ValidateHelpers.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/arm_compute/graph/backends/ValidateHelpers.h b/arm_compute/graph/backends/ValidateHelpers.h
index 1de3aa9a31..eb3762571d 100644
--- a/arm_compute/graph/backends/ValidateHelpers.h
+++ b/arm_compute/graph/backends/ValidateHelpers.h
@@ -248,6 +248,29 @@ Status validate_reorg_layer(ReorgLayerNode &node)
// Validate function
return ReorgLayer::validate(input, output, node.stride());
}
+
+/** Validates a YOLO layer node
+ *
+ * @tparam YOLOLayer YOLO layer type
+ *
+ * @param[in] node Node to validate
+ *
+ * @return Status
+ */
+template <typename YOLOLayer>
+Status validate_yolo_layer(YOLOLayerNode &node)
+{
+ ARM_COMPUTE_LOG_GRAPH_VERBOSE("Validating YOLOLayer 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 input and output
+ arm_compute::ITensorInfo *input = detail::get_backing_tensor_info(node.input(0));
+ arm_compute::ITensorInfo *output = get_backing_tensor_info(node.output(0));
+
+ // Validate function
+ return YOLOLayer::validate(input, output, node.activation_info(), node.num_classes());
+}
} // namespace detail
} // namespace backends
} // namespace graph