From: 박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Fri, 9 Aug 2019 03:38:58 +0000 (+0900) Subject: [moco-tf] Check attributes for ConcatV2 validate (#6428) X-Git-Tag: submit/tizen/20190812.062103~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1628af434a0d9dbd24f484c98aa5ff895b335cd5;p=platform%2Fcore%2Fml%2Fnnfw.git [moco-tf] Check attributes for ConcatV2 validate (#6428) This will add attribute existence check for ConcatV2 node validation Signed-off-by: SaeHie Park --- diff --git a/compiler/moco-tf/src/Op/Concat.cpp b/compiler/moco-tf/src/Op/Concat.cpp index 7f81cce..7008f69 100644 --- a/compiler/moco-tf/src/Op/Concat.cpp +++ b/compiler/moco-tf/src/Op/Concat.cpp @@ -117,6 +117,9 @@ namespace tf bool ConcatV2GraphBuilderBase::validate(const tensorflow::NodeDef &node) const { + if (!plier::tf::has_attrs(node, {"T", "N", "Tidx"})) + return false; + // Concat node SHOULD have 3 or more inputs, that is 2 + axis const int num_inputs = node.input_size() - 1; assert(num_inputs >= 2);