From 853581bc046b12fe43f0246fe946792235a22a08 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=91=D0=B0=D1=80?= =?utf8?q?=D0=B0=D0=BD=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2/AI=20Tools=20Lab=20/S?= =?utf8?q?RR/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Wed, 4 Sep 2019 18:37:14 +0300 Subject: [PATCH] [mir_tflite] Change type of strides argument (#7176) Change the type of `strides` argument of `Conv2D` and `DepthwiseConv2D` operations to `vector`. Signed-off-by: Sergei Barannikov --- compiler/mir-tflite-importer/tflite_op_creator.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/mir-tflite-importer/tflite_op_creator.cpp b/compiler/mir-tflite-importer/tflite_op_creator.cpp index 3f4232b..ae5bd94 100644 --- a/compiler/mir-tflite-importer/tflite_op_creator.cpp +++ b/compiler/mir-tflite-importer/tflite_op_creator.cpp @@ -130,8 +130,7 @@ TFLiteOpCreator::convertConv2D(const Conv2DOptions *opts, padding_after); auto result = - createOp(input, kernel, Shape(strides), padding_before, padding_after) - ->getOutput(0); + createOp(input, kernel, strides, padding_before, padding_after)->getOutput(0); result = createOp(result, bias)->getOutput(0); return {addFusedActivation(result, opts->fused_activation_function())}; } @@ -159,7 +158,7 @@ TFLiteOpCreator::convertDepthwiseConv2D(const DepthwiseConv2DOptions *opts, padding_after); auto result = - createOp(input, kernel, Shape(strides), padding_before, padding_after) + createOp(input, kernel, strides, padding_before, padding_after) ->getOutput(0); result = createOp(result, bias)->getOutput(0); return {addFusedActivation(result, opts->fused_activation_function())}; @@ -265,7 +264,7 @@ TFLiteOpCreator::convertTransposeConv(const ::tflite::TransposeConvOptions *opts auto kernel = inputs.at(1); auto input = inputs.at(2); - Shape strides{opts->stride_h(), opts->stride_w()}; + const std::vector strides{opts->stride_h(), opts->stride_w()}; Shape output_shape(convertIntTensorToVector(output_shape_tensor)); // OHWI -> HWOI -- 2.7.4