diff options
Diffstat (limited to 'nn/common/operations/StridedSlice.cpp')
-rw-r--r-- | nn/common/operations/StridedSlice.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nn/common/operations/StridedSlice.cpp b/nn/common/operations/StridedSlice.cpp index cd972d3de..5ff5aeca8 100644 --- a/nn/common/operations/StridedSlice.cpp +++ b/nn/common/operations/StridedSlice.cpp @@ -191,6 +191,11 @@ bool prepare(IOperationExecutionContext* context) { } } + // Handle the case when all dimensions are removed + if (outDims.empty()) { + outDims.push_back(1); + } + Shape outputShape = context->getOutputShape(kOutputTensor); NN_RET_CHECK(SetShape(inputShape, &outputShape)); outputShape.dimensions = outDims; |