[moco-tf] Check attributes for ConcatV2 validate (#6428)
author박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Fri, 9 Aug 2019 03:38:58 +0000 (12:38 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Fri, 9 Aug 2019 03:38:58 +0000 (12:38 +0900)
This will add attribute existence check for ConcatV2 node validation

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
compiler/moco-tf/src/Op/Concat.cpp

index 7f81cce..7008f69 100644 (file)
@@ -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);