Skip to content

Commit 0e38642

Browse files
authored
[NNAdapter] Fix the error of slice constant folding calculation (#9542)
1 parent 3edc805 commit 0e38642

File tree

1 file changed

+1
-1
lines changed
  • lite/backends/nnadapter/nnadapter/include/nnadapter/operation/math

1 file changed

+1
-1
lines changed

lite/backends/nnadapter/nnadapter/include/nnadapter/operation/math/slice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static int slice(const T* input_data,
3333
std::vector<int32_t> output_shape(input_shape);
3434
std::vector<int> real_starts(input_shape.size(), 0);
3535
std::vector<int> real_ends(input_shape.size(), 0);
36-
std::vector<int> real_step(input_shape.size(), 0);
36+
std::vector<int> real_step(input_shape.size(), 1);
3737
for (size_t i = 0; i < input_shape.size(); i++) {
3838
real_ends[i] = input_shape[i];
3939
}

0 commit comments

Comments
 (0)