From 6c7c38e70c795077ba727aadeefc670888bec089 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Wed, 29 Aug 2018 16:28:11 +0100 Subject: COMPMID-1462 SSD support: Create CL PriorBox Change-Id: I5bf5d751ec7c02d96c26a769f49d03ea23a248b7 --- utils/TypePrinter.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'utils') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 571de9a4ef..df16cba9b5 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -1324,6 +1324,30 @@ inline std::string to_string(const PoolingLayerInfo &info) return str.str(); } +/** Formatted output of the PriorBoxLayerInfo. + * + * @param[in] info Type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const PriorBoxLayerInfo &info) +{ + std::stringstream str; + str << "{"; + str << "Clip:" << info.clip() + << "Flip:" << info.flip() + << "StepX:" << info.steps()[0] + << "StepY:" << info.steps()[1] + << "MinSizes:" << info.min_sizes().size() + << "MaxSizes:" << info.max_sizes().size() + << "ImgSizeX:" << info.img_size().x + << "ImgSizeY:" << info.img_size().y + << "Offset:" << info.offset() + << "Variances:" << info.variances().size(); + str << "}"; + return str.str(); +} + /** Formatted output of the KeyPoint type. * * @param[out] os Output stream @@ -1780,6 +1804,29 @@ inline ::std::ostream &operator<<(::std::ostream &os, const std::vector &args return os; } +/** Formatted output of @ref PriorBoxLayerInfo. + * + * @param[out] os Output stream. + * @param[in] info Type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const PriorBoxLayerInfo &info) +{ + os << "Clip:" << info.clip() + << "Flip:" << info.flip() + << "StepX:" << info.steps()[0] + << "StepY:" << info.steps()[1] + << "MinSizes:" << info.min_sizes() + << "MaxSizes:" << info.max_sizes() + << "ImgSizeX:" << info.img_size().x + << "ImgSizeY:" << info.img_size().y + << "Offset:" << info.offset() + << "Variances:" << info.variances(); + + return os; +} + /** Formatted output of a vector of objects. * * @param[in] args Vector of objects to print -- cgit v1.2.1