diff options
author | Isabella Gottardi <isabella.gottardi@arm.com> | 2019-01-08 13:48:44 +0000 |
---|---|---|
committer | Isabella Gottardi <isabella.gottardi@arm.com> | 2019-08-06 07:58:16 +0000 |
commit | a7acb3cbabeb66ce647684466a04c96b2963c9c9 (patch) | |
tree | 7988b75372c8ad1dfa3c8d028ab3a603a5e5a047 /utils/GraphUtils.h | |
parent | 4746326ecb075dcfa123aaa8b38de5ec3e534b60 (diff) | |
download | ComputeLibrary-a7acb3cbabeb66ce647684466a04c96b2963c9c9.tar.gz |
COMPMID-1849: Implement CPPDetectionPostProcessLayer
* Add DetectionPostProcessLayer
* Add DetectionPostProcessLayer at the graph
Change-Id: I7e56f6cffc26f112d26dfe74853085bb8ec7d849
Signed-off-by: Isabella Gottardi <isabella.gottardi@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1639
Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils/GraphUtils.h')
-rw-r--r-- | utils/GraphUtils.h | 9 |
1 files changed, 6 insertions, 3 deletions
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<graph::ITensorAccessor> 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<graph::ITensorAccessor> get_npy_output_accessor(const std::string &npy_path, TensorShape shape, DataType data_type, std::ostream &output_stream = std::cout) +inline std::unique_ptr<graph::ITensorAccessor> 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<graph::ITensorAccessor> get_npy_output_accessor(const std } else { - return arm_compute::support::cpp14::make_unique<NumPyAccessor>(npy_path, shape, data_type, output_stream); + return arm_compute::support::cpp14::make_unique<NumPyAccessor>(npy_path, shape, data_type, data_layout, output_stream); } } |