aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arm_compute/core/TensorShape.h2
-rw-r--r--tests/validation_old/UNIT/TensorShape.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/arm_compute/core/TensorShape.h b/arm_compute/core/TensorShape.h
index 8d15c50220..3b395e74ce 100644
--- a/arm_compute/core/TensorShape.h
+++ b/arm_compute/core/TensorShape.h
@@ -164,7 +164,7 @@ private:
/** Remove trailing dimensions of size 1 from the reported number of dimensions. */
void apply_dimension_correction()
{
- for(int i = static_cast<int>(_num_dimensions) - 1; i >= 0; --i)
+ for(int i = static_cast<int>(_num_dimensions) - 1; i > 0; --i)
{
if(_id[i] == 1)
{
diff --git a/tests/validation_old/UNIT/TensorShape.cpp b/tests/validation_old/UNIT/TensorShape.cpp
index 3505b1ae05..ef888b24c8 100644
--- a/tests/validation_old/UNIT/TensorShape.cpp
+++ b/tests/validation_old/UNIT/TensorShape.cpp
@@ -47,7 +47,7 @@ BOOST_DATA_TEST_CASE(Construction,
TensorShape{ 2U, 3U, 5U, 7U, 11U },
TensorShape{ 2U, 3U, 5U, 7U, 11U, 13U }
})
- ^ boost::unit_test::data::make({ 0, 0, 1, 2, 3, 4, 5, 6 }) ^ boost::unit_test::data::make({ 0, 1, 2, 6, 30, 210, 2310, 30030 }),
+ ^ boost::unit_test::data::make({ 0, 1, 1, 2, 3, 4, 5, 6 }) ^ boost::unit_test::data::make({ 0, 1, 2, 6, 30, 210, 2310, 30030 }),
shape, num_dimensions, total_size)
{
BOOST_TEST(shape.num_dimensions() == num_dimensions);