aboutsummaryrefslogtreecommitdiff
path: root/src/core/TensorInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/TensorInfo.cpp')
-rw-r--r--src/core/TensorInfo.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/core/TensorInfo.cpp b/src/core/TensorInfo.cpp
index 60e76bf84a..2008217c85 100644
--- a/src/core/TensorInfo.cpp
+++ b/src/core/TensorInfo.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017 ARM Limited.
+ * Copyright (c) 2016, 2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -159,9 +159,7 @@ void TensorInfo::init(const TensorShape &tensor_shape, size_t num_channels, Data
_strides_in_bytes = strides_in_bytes;
_total_size = total_size_in_bytes;
- Coordinates coordinates;
- coordinates.set_num_dimensions(_tensor_shape.num_dimensions());
- _valid_region = ValidRegion{ coordinates, _tensor_shape };
+ _valid_region = ValidRegion{ Coordinates(), _tensor_shape };
}
void TensorInfo::init(const HOGInfo &hog_info, unsigned int width, unsigned int height)
@@ -201,9 +199,7 @@ size_t TensorInfo::init_auto_padding(const TensorShape &tensor_shape, size_t num
_format = Format::UNKNOWN;
_tensor_shape = tensor_shape;
- Coordinates coordinates;
- coordinates.set_num_dimensions(_tensor_shape.num_dimensions());
- _valid_region = ValidRegion{ coordinates, _tensor_shape };
+ _valid_region = ValidRegion{ Coordinates(), _tensor_shape };
auto_padding();
@@ -368,9 +364,7 @@ ITensorInfo &TensorInfo::set_tensor_shape(TensorShape shape)
_total_size = _tensor_shape[idx_last_dimension] * _strides_in_bytes[idx_last_dimension];
}
- Coordinates coordinates;
- coordinates.set_num_dimensions(_tensor_shape.num_dimensions());
- _valid_region = ValidRegion{ coordinates, _tensor_shape };
+ _valid_region = ValidRegion{ Coordinates(), _tensor_shape };
return *this;
}