[moco/tf] using static for local var inside validate() (#3564)
author윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 <hyunsik.yoon@samsung.com>
Tue, 21 May 2019 09:58:15 +0000 (18:58 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Tue, 21 May 2019 09:58:15 +0000 (18:58 +0900)
Attrs names of MaxPool2D is now static.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
contrib/moco/lib/frontend/tf/src/Op/MaxPool2D.cpp

index ccd5d81..8748868 100644 (file)
@@ -61,7 +61,7 @@ bool MaxPool2DGraphBuilder::validate(const tensorflow::NodeDef &node) const
 {
   // note: even though "data_format" is not entered when a model is written,
   //       TF seems to generate "data_format" field into a pb file
-  ::std::string attrs[] = {"T", "data_format", "ksize", "padding", "strides"};
+  static std::string attrs[] = {"T", "data_format", "ksize", "padding", "strides"};
 
   for (auto attr : attrs)
     if (!node.attr().count(attr))