From: 박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Tue, 16 Jul 2019 01:28:01 +0000 (+0900) Subject: [moco/tf] Skip fix_shape for add when disconnected (#4282) X-Git-Tag: nncc_backup~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2fe5364e8b90681295becb7f48819668f40136a2;p=platform%2Fcore%2Fml%2Fnnfw.git [moco/tf] Skip fix_shape for add when disconnected (#4282) This will skip fix_shape for TFAdd node when it's disconnected from some transformation Signed-off-by: SaeHie Park --- diff --git a/contrib/moco-tf/src/Transforms/FixShapeTransform.cpp b/contrib/moco-tf/src/Transforms/FixShapeTransform.cpp index b9efe1b..d396e23 100644 --- a/contrib/moco-tf/src/Transforms/FixShapeTransform.cpp +++ b/contrib/moco-tf/src/Transforms/FixShapeTransform.cpp @@ -552,6 +552,12 @@ bool fix_shape(moco::tf::TFAdd *node) { auto x = node->x(); auto y = node->y(); + if (x == nullptr || y == nullptr) + { + // this node maybe disconnected by some transformation + // TODO remove this block after fixing to iterate only active nodes + return false; + } auto x_shapedata = x->annot(); auto y_shapedata = y->annot(); if (x_shapedata == nullptr || y_shapedata == nullptr)