From 0e386425d6e4ad424b9719c04f3ff8b8938664e1 Mon Sep 17 00:00:00 2001 From: shentanyue <34421038+shentanyue@users.noreply.github.com> Date: Fri, 14 Oct 2022 11:17:48 +0800 Subject: [PATCH] [NNAdapter] Fix the error of slice constant folding calculation (#9542) --- .../nnadapter/include/nnadapter/operation/math/slice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lite/backends/nnadapter/nnadapter/include/nnadapter/operation/math/slice.h b/lite/backends/nnadapter/nnadapter/include/nnadapter/operation/math/slice.h index f22751fe639..45d1d134904 100644 --- a/lite/backends/nnadapter/nnadapter/include/nnadapter/operation/math/slice.h +++ b/lite/backends/nnadapter/nnadapter/include/nnadapter/operation/math/slice.h @@ -33,7 +33,7 @@ static int slice(const T* input_data, std::vector output_shape(input_shape); std::vector real_starts(input_shape.size(), 0); std::vector real_ends(input_shape.size(), 0); - std::vector real_step(input_shape.size(), 0); + std::vector real_step(input_shape.size(), 1); for (size_t i = 0; i < input_shape.size(); i++) { real_ends[i] = input_shape[i]; }