[moco-tf] Fix Placeholder import (#8114)
author박천교/On-Device Lab(SR)/Engineer/삼성전자 <ch.bahk@samsung.com>
Mon, 14 Oct 2019 06:49:58 +0000 (15:49 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Mon, 14 Oct 2019 06:49:58 +0000 (15:49 +0900)
Previously, Placeholder with negative value was not caught by assertion,
and converted to Pull with overflowed value. This commit fixes this
behaviour

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
compiler/moco-tf/src/Op/Placeholder.cpp

index e0b24d5..1b3834b 100644 (file)
@@ -73,7 +73,7 @@ void PlaceholderGraphBuilder::build(const tensorflow::NodeDef &node,
   {
     assert(shape.dim(d).size() < std::numeric_limits<uint32_t>::max());
     int64_t dim_value = shape.dim(d).size();
-    if (dim_value >= 0ULL)
+    if (dim_value >= 0)
     {
       uint32_t dim_value32 = static_cast<uint32_t>(dim_value);
       pull_node->dim(d) = dim_value32;