1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

dnn(ngraph): add debuging messages

This commit is contained in:
Alexander Alekhin
2022-02-05 14:36:57 +00:00
parent 062f305d1a
commit 67978b5746
3 changed files with 32 additions and 7 deletions
@@ -184,7 +184,8 @@ static inline MatShape concat(const MatShape& a, const MatShape& b)
return c;
}
static inline std::string toString(const MatShape& shape, const String& name = "")
template<typename _Tp>
static inline std::string toString(const std::vector<_Tp>& shape, const String& name = "")
{
std::ostringstream ss;
if (!name.empty())
@@ -195,11 +196,14 @@ static inline std::string toString(const MatShape& shape, const String& name = "
ss << " ]";
return ss.str();
}
static inline void print(const MatShape& shape, const String& name = "")
template<typename _Tp>
static inline void print(const std::vector<_Tp>& shape, const String& name = "")
{
std::cout << toString(shape, name) << std::endl;
}
static inline std::ostream& operator<<(std::ostream &out, const MatShape& shape)
template<typename _Tp>
static inline std::ostream& operator<<(std::ostream &out, const std::vector<_Tp>& shape)
{
out << toString(shape);
return out;