diff options
Diffstat (limited to 'utils/TypePrinter.h')
-rw-r--r-- | utils/TypePrinter.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index b868aa94a1..571de9a4ef 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -233,6 +233,34 @@ inline std::string to_string(const ROIPoolingLayerInfo &pool_info) return str.str(); } +/** Formatted output of the BoundingBoxTransformInfo type. + * + * @param[out] os Output stream. + * @param[in] bbox_info Type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const BoundingBoxTransformInfo &bbox_info) +{ + auto weights = bbox_info.weights(); + os << "(" << bbox_info.img_width() << "x" << bbox_info.img_height() << ")~" << bbox_info.scale() << "(weights = {" << weights[0] << ", " << weights[1] << ", " << weights[2] << ", " << weights[3] << + "})"; + return os; +} + +/** Formatted output of the BoundingBoxTransformInfo type. + * + * @param[in] bbox_info Type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const BoundingBoxTransformInfo &bbox_info) +{ + std::stringstream str; + str << bbox_info; + return str.str(); +} + /** Formatted output of the QuantizationInfo type. * * @param[out] os Output stream. |