[moco/tf] DepthwiseConv2D FixShapeTransform bug fix. (#6003)
author채성우/On-Device Lab(SR)/Engineer/삼성전자 <sw4670.chae@samsung.com>
Tue, 30 Jul 2019 04:52:46 +0000 (04:52 +0000)
committer박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Tue, 30 Jul 2019 04:52:46 +0000 (13:52 +0900)
It needs to be modified for getting right stride data.

Signed-off-by: seongwoo <sw4670.chae@samsung.com>
compiler/moco-tf/src/Transforms/FixShapeTransform.cpp

index 36cc79d..23275df 100644 (file)
@@ -840,8 +840,10 @@ bool fix_shape(moco::tf::TFDepthwiseConv2dNative *node)
     return false;
   }
 
-  auto stride_data = node->annot<StrideData>();
-  assert(stride_data == nullptr);
+  {
+    auto stride_data = node->annot<StrideData>();
+    assert(stride_data == nullptr);
+  }
 
   auto stride_copy = stdex::make_unique<StrideData>();
   auto strides = node->strides();
@@ -862,6 +864,9 @@ bool fix_shape(moco::tf::TFDepthwiseConv2dNative *node)
   }
   node->annot(std::move(stride_copy));
 
+  auto stride_data = node->annot<StrideData>();
+  assert(stride_data != nullptr);
+
   INFO(l) << "FixShape TFDepthwiseConv2dNative strides = " << stride_data->stride()->vertical()
           << ", " << stride_data->stride()->horizontal();