From 8c69c41b51ea60c987e3b9a796a1bae814167e18 Mon Sep 17 00:00:00 2001 From: Cyril Moineau <cyril.moineau@cea.fr> Date: Wed, 8 Jan 2025 08:56:17 +0000 Subject: [PATCH] Apply 1 suggestion(s) to 1 file(s) --- src/operator/Slice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/operator/Slice.cpp b/src/operator/Slice.cpp index 8e9f71e73..31c7c09c9 100644 --- a/src/operator/Slice.cpp +++ b/src/operator/Slice.cpp @@ -258,7 +258,7 @@ bool Aidge::Slice_Op::forwardDims(bool allowDataDependency) { static_cast<DimSize_t>(this->starts()[i]) : static_cast<DimSize_t>(this->starts()[i] + static_cast<DimSize_t>(getInput(0)->dims()[axis])); // Clamp start to the range [0, axis_dim] - start = std::max(static_cast<DimSize_t>(0), std::min(start, getInput(0)->dims()[axis])); + start = std::max(static_cast<DimSize_t>(0), std::min(start, getInput(0)->dims()[axis]-1)); DimSize_t end = this->ends()[i] >= 0 ? static_cast<DimSize_t>(this->ends()[i]) : -- GitLab