From ad571af39dff223e9a27336ecde5a87c7f02bff1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=84=B8=ED=9D=AC/On-Device=20Lab=28SR=29/Princip?= =?utf8?q?al=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Wed, 7 Aug 2019 10:42:10 +0900 Subject: [PATCH] [moco-tf] Fix pad for TFConv2D in fix shape (#6250) This will merge fix pad for TFConv2D node in fix shape transform Signed-off-by: SaeHie Park --- compiler/moco-tf/src/Transforms/FixShapeTransform.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp b/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp index 614bd02..cdf9335 100644 --- a/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp +++ b/compiler/moco-tf/src/Transforms/FixShapeTransform.cpp @@ -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(); return true; } -- 2.7.4