aboutsummaryrefslogtreecommitdiff
path: root/src/core/utils/helpers/tensor_transform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/utils/helpers/tensor_transform.cpp')
-rw-r--r--src/core/utils/helpers/tensor_transform.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/utils/helpers/tensor_transform.cpp b/src/core/utils/helpers/tensor_transform.cpp
index f6a54a59ee..cd874b24b3 100644
--- a/src/core/utils/helpers/tensor_transform.cpp
+++ b/src/core/utils/helpers/tensor_transform.cpp
@@ -88,7 +88,14 @@ int calculate_end_on_index(TensorShape input_shape, int index, int start_on_inde
// Shrink dimension
if(shrink_axis)
{
- stop = start_on_index + 1;
+ if(start_on_index == std::numeric_limits<int>::max())
+ {
+ stop = start_on_index;
+ }
+ else
+ {
+ stop = start_on_index + 1;
+ }
}
// Reset in case of begin mask present