diff options
author | Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 <s.barannikov@samsung.com> | 2019-09-04 18:37:14 +0300 |
---|---|---|
committer | Alexander Efimov/AI Tools Lab/./Samsung Electronics <a.efimov@samsung.com> | 2019-09-04 18:37:14 +0300 |
commit | 853581bc046b12fe43f0246fe946792235a22a08 (patch) | |
tree | 0a8bd6588d2d25d1a45d07c12bcdb74f9a045e73 /compiler | |
parent | 4841074de0f019c1eb95789cc29b0531bec86a91 (diff) | |
download | nnfw-853581bc046b12fe43f0246fe946792235a22a08.tar.gz nnfw-853581bc046b12fe43f0246fe946792235a22a08.tar.bz2 nnfw-853581bc046b12fe43f0246fe946792235a22a08.zip |
[mir_tflite] Change type of strides argument (#7176)
Change the type of `strides` argument of `Conv2D` and `DepthwiseConv2D` operations to `vector<int32_t>`.
Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/mir-tflite-importer/tflite_op_creator.cpp | 7 |
1 files 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 3f4232b65..ae5bd945f 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<ops::Conv2DOp>(input, kernel, Shape(strides), padding_before, padding_after) - ->getOutput(0); + createOp<ops::Conv2DOp>(input, kernel, strides, padding_before, padding_after)->getOutput(0); result = createOp<ops::AddOp>(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<ops::DepthwiseConv2DOp>(input, kernel, Shape(strides), padding_before, padding_after) + createOp<ops::DepthwiseConv2DOp>(input, kernel, strides, padding_before, padding_after) ->getOutput(0); result = createOp<ops::AddOp>(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<std::int32_t> strides{opts->stride_h(), opts->stride_w()}; Shape output_shape(convertIntTensorToVector<int32_t>(output_shape_tensor)); // OHWI -> HWOI |