[moco-tf] Fix pad for TFConv2D in fix shape (#6250)
author박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Wed, 7 Aug 2019 01:42:10 +0000 (10:42 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 7 Aug 2019 01:42:10 +0000 (10:42 +0900)
This will merge fix pad for TFConv2D node in fix shape transform

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

index 614bd02..cdf9335 100644 (file)
@@ -951,8 +951,14 @@ bool fix_shape(moco::tf::TFConv2D *node)
   shape_data->tensor_shape(ofm_tensor_shape);
   node->annot(std::move(shape_data));
 
+  FixPadContext ctx = {input_height,  input_width,  output_height,        output_width,
+                       stride_height, stride_width, effective_ker_height, effective_ker_width};
+
+  calc_annot_paddata(node, ctx);
+
   INFO(l) << "Fix TFConv2D shape = ifm" << ifm_tensor_shape << " ker" << ker_tensor_shape
           << " --> ofm" << ofm_tensor_shape;
+  INFO(l) << "             pad = " << *node->annot<PadData>();
 
   return true;
 }