From 225fc5e4984e256a41f60efd471fecdd03cc1421 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=84=B8=ED=9D=AC/On-Device=20Lab=28SR=29/Princip?= =?utf8?q?al=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Wed, 19 Jun 2019 13:40:13 +0900 Subject: [PATCH] [moco/tf] throw instead of assert (#3874) This will use throw runtime_error if rank mismatches for ShareInferenceData Signed-off-by: SaeHie Park --- contrib/moco/lib/frontend/tf/src/Annotations/ShapeInferenceData.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/moco/lib/frontend/tf/src/Annotations/ShapeInferenceData.cpp b/contrib/moco/lib/frontend/tf/src/Annotations/ShapeInferenceData.cpp index 85e00df..aeffd40 100644 --- a/contrib/moco/lib/frontend/tf/src/Annotations/ShapeInferenceData.cpp +++ b/contrib/moco/lib/frontend/tf/src/Annotations/ShapeInferenceData.cpp @@ -41,9 +41,8 @@ loco::FeatureShape ShapeInferenceData::feature_shape(void) const { loco::FeatureShape shape; - assert(rank() == 4); if (rank() != 4) - return shape; + throw std::runtime_error("Feature should be rank 4"); shape.count() = dim(0); shape.height() = dim(1); -- 2.7.4