aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/fixtures/ConcatenateLayerFixture.h
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-04-05 17:18:36 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2019-04-16 16:02:13 +0000
commita9c4472188abef421adb589e2a6fef52727d465f (patch)
treef8f6540b05049074030c32332b5427e826cc58ea /tests/validation/fixtures/ConcatenateLayerFixture.h
parent2ec6c1eb6ee77b79e8ab6b97b8cd70bcc4c5589d (diff)
downloadComputeLibrary-a9c4472188abef421adb589e2a6fef52727d465f.tar.gz
COMPMID-2051 Refactor shape_calculator::calculate_concatenate_shape
Change-Id: Ibf316718d11fa975d75f226925747b21c4efd127 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/974 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'tests/validation/fixtures/ConcatenateLayerFixture.h')
-rw-r--r--tests/validation/fixtures/ConcatenateLayerFixture.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/validation/fixtures/ConcatenateLayerFixture.h b/tests/validation/fixtures/ConcatenateLayerFixture.h
index 39d4f9f95d..d1eed63d41 100644
--- a/tests/validation/fixtures/ConcatenateLayerFixture.h
+++ b/tests/validation/fixtures/ConcatenateLayerFixture.h
@@ -73,7 +73,7 @@ public:
// Generate more shapes based on the input
for(auto &s : shapes)
{
- // Randomly change the first dimension
+ // Randomly change the dimension
if(mutate_dis(gen))
{
// Decrease the dimension by a small percentage. Don't increase
@@ -144,18 +144,20 @@ protected:
return dst;
}
- SimpleTensor<T> compute_reference(const std::vector<TensorShape> &shapes, const std::vector<QuantizationInfo> &qinfo, DataType data_type, unsigned int axis)
+ SimpleTensor<T> compute_reference(std::vector<TensorShape> &shapes, const std::vector<QuantizationInfo> &qinfo, DataType data_type, unsigned int axis)
{
std::vector<SimpleTensor<T>> srcs;
+ std::vector<TensorShape *> src_ptrs;
// Create and fill tensors
for(size_t j = 0; j < shapes.size(); ++j)
{
srcs.emplace_back(shapes[j], data_type, 1, qinfo[j]);
fill(srcs.back(), j);
+ src_ptrs.emplace_back(&shapes[j]);
}
- const TensorShape dst_shape = calculate_concatenate_shape(shapes, axis);
+ const TensorShape dst_shape = misc::shape_calculator::calculate_concatenate_shape(src_ptrs, axis);
SimpleTensor<T> dst{ dst_shape, data_type, 1, qinfo[shapes.size()] };
return reference::concatenate_layer<T>(srcs, dst, axis);
}