From eff42f63871d764c3db39780d6030e7707d2571c Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 11 Dec 2017 20:00:12 +0000 Subject: [PATCH] dnn: more debug info --- modules/dnn/src/layers/max_unpooling_layer.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/dnn/src/layers/max_unpooling_layer.cpp b/modules/dnn/src/layers/max_unpooling_layer.cpp index e0c105d..daac578 100644 --- a/modules/dnn/src/layers/max_unpooling_layer.cpp +++ b/modules/dnn/src/layers/max_unpooling_layer.cpp @@ -14,6 +14,8 @@ Implementation of Batch Normalization layer. #include "op_halide.hpp" #include +#include + namespace cv { namespace dnn @@ -94,7 +96,20 @@ public: for(int i_wh = 0; i_wh < wh_area; i_wh++) { int index = idxptr[i_wh]; - CV_Assert(0 <= index && index < outPlaneTotal); + if (!(0 <= index && index < outPlaneTotal)) + { + std::cerr + << "i_n=" << i_n << std::endl + << "i_c=" << i_c << std::endl + << "i_wh=" << i_wh << std::endl + << "index=" << index << std::endl + << "outPlaneTotal=" << outPlaneTotal << std::endl + << "input.size=" << input.size << std::endl + << "indices.size=" << indices.size << std::endl + << "outBlob=" << outBlob.size << std::endl + ; + CV_Assert(0 <= index && index < outPlaneTotal); + } outptr[index] = inptr[i_wh]; } } -- 2.7.4