From a7acb3cbabeb66ce647684466a04c96b2963c9c9 Mon Sep 17 00:00:00 2001 From: Isabella Gottardi Date: Tue, 8 Jan 2019 13:48:44 +0000 Subject: COMPMID-1849: Implement CPPDetectionPostProcessLayer * Add DetectionPostProcessLayer * Add DetectionPostProcessLayer at the graph Change-Id: I7e56f6cffc26f112d26dfe74853085bb8ec7d849 Signed-off-by: Isabella Gottardi Reviewed-on: https://review.mlplatform.org/c/1639 Reviewed-by: Giuseppe Rossini Tested-by: Arm Jenkins --- utils/GraphUtils.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'utils/GraphUtils.h') diff --git a/utils/GraphUtils.h b/utils/GraphUtils.h index fe19eb3196..3417135f17 100644 --- a/utils/GraphUtils.h +++ b/utils/GraphUtils.h @@ -145,9 +145,10 @@ public: * @param[in] npy_path Path to npy file. * @param[in] shape Shape of the numpy tensor data. * @param[in] data_type DataType of the numpy tensor data. + * @param[in] data_layout (Optional) DataLayout of the numpy tensor data. * @param[out] output_stream (Optional) Output stream */ - NumPyAccessor(std::string npy_path, TensorShape shape, DataType data_type, std::ostream &output_stream = std::cout); + NumPyAccessor(std::string npy_path, TensorShape shape, DataType data_type, DataLayout data_layout = DataLayout::NCHW, std::ostream &output_stream = std::cout); /** Allow instances of this class to be move constructed */ NumPyAccessor(NumPyAccessor &&) = default; /** Prevent instances of this class from being copied (As this class contains pointers) */ @@ -567,11 +568,13 @@ inline std::unique_ptr get_detection_output_accessor(con * @param[in] npy_path Path to npy file. * @param[in] shape Shape of the numpy tensor data. * @param[in] data_type DataType of the numpy tensor data. + * @param[in] data_layout DataLayout of the numpy tensor data. * @param[out] output_stream (Optional) Output stream * * @return An appropriate tensor accessor */ -inline std::unique_ptr get_npy_output_accessor(const std::string &npy_path, TensorShape shape, DataType data_type, std::ostream &output_stream = std::cout) +inline std::unique_ptr get_npy_output_accessor(const std::string &npy_path, TensorShape shape, DataType data_type, DataLayout data_layout = DataLayout::NCHW, + std::ostream &output_stream = std::cout) { if(npy_path.empty()) { @@ -579,7 +582,7 @@ inline std::unique_ptr get_npy_output_accessor(const std } else { - return arm_compute::support::cpp14::make_unique(npy_path, shape, data_type, output_stream); + return arm_compute::support::cpp14::make_unique(npy_path, shape, data_type, data_layout, output_stream); } } -- cgit v1.2.1