From 40606df5cc5e687e4d72af842af8d65fc4228cbc Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Mon, 23 Jul 2018 14:41:59 +0100 Subject: COMPMID-1414: Print the image being validated during graph validation Also enable the asserts in release mode as they should stop any example from running Change-Id: I308daa53c2096758f088872191b2fcba2131255c Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/140988 Reviewed-by: Pablo Tello Tested-by: Jenkins --- utils/GraphUtils.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'utils/GraphUtils.h') diff --git a/utils/GraphUtils.h b/utils/GraphUtils.h index 6d537865ba..6cec2dae4d 100644 --- a/utils/GraphUtils.h +++ b/utils/GraphUtils.h @@ -181,21 +181,23 @@ class ValidationInputAccessor final : public graph::ITensorAccessor public: /** Constructor * - * @param[in] image_list File containing all the images to validate - * @param[in] images_path Path to images. - * @param[in] bgr (Optional) Fill the first plane with blue channel (default = false - RGB format) - * @param[in] preprocessor (Optional) Image pre-processing object (default = nullptr) - * @param[in] start (Optional) Start range - * @param[in] end (Optional) End range + * @param[in] image_list File containing all the images to validate + * @param[in] images_path Path to images. + * @param[in] bgr (Optional) Fill the first plane with blue channel (default = false - RGB format) + * @param[in] preprocessor (Optional) Image pre-processing object (default = nullptr) + * @param[in] start (Optional) Start range + * @param[in] end (Optional) End range + * @param[out] output_stream (Optional) Output stream * * @note Range is defined as [start, end] */ ValidationInputAccessor(const std::string &image_list, std::string images_path, - std::unique_ptr preprocessor = nullptr, - bool bgr = true, - unsigned int start = 0, - unsigned int end = 0); + std::unique_ptr preprocessor = nullptr, + bool bgr = true, + unsigned int start = 0, + unsigned int end = 0, + std::ostream &output_stream = std::cout); // Inherited methods overriden: bool access_tensor(ITensor &tensor) override; @@ -206,6 +208,7 @@ private: std::unique_ptr _preprocessor; bool _bgr; size_t _offset; + std::ostream &_output_stream; }; /** Output Accessor used for network validation */ -- cgit v1.2.1