diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-04-05 17:18:36 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-04-16 16:02:13 +0000 |
commit | a9c4472188abef421adb589e2a6fef52727d465f (patch) | |
tree | f8f6540b05049074030c32332b5427e826cc58ea /src/graph/nodes/ConcatenateLayerNode.cpp | |
parent | 2ec6c1eb6ee77b79e8ab6b97b8cd70bcc4c5589d (diff) | |
download | ComputeLibrary-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 'src/graph/nodes/ConcatenateLayerNode.cpp')
-rw-r--r-- | src/graph/nodes/ConcatenateLayerNode.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/graph/nodes/ConcatenateLayerNode.cpp b/src/graph/nodes/ConcatenateLayerNode.cpp index 48da8b6e9e..ff515c4427 100644 --- a/src/graph/nodes/ConcatenateLayerNode.cpp +++ b/src/graph/nodes/ConcatenateLayerNode.cpp @@ -68,6 +68,7 @@ TensorDescriptor ConcatenateLayerNode::compute_output_descriptor(const std::vect TensorDescriptor output_descriptor = input_descriptors[0]; const int axis_idx = get_dimension_idx(output_descriptor.layout, axis); + ARM_COMPUTE_ERROR_ON_MSG(axis_idx > 2, "Unsupported concatenation axis!"); // Extract shapes std::vector<const TensorShape *> shapes; @@ -76,18 +77,7 @@ TensorDescriptor ConcatenateLayerNode::compute_output_descriptor(const std::vect shapes.emplace_back(&input_descriptor.shape); } - if(axis_idx < 2) - { - output_descriptor.shape = arm_compute::misc::shape_calculator::calculate_concatenate_shape(shapes, axis_idx); - } - else if(axis_idx == 2) - { - output_descriptor.shape = arm_compute::misc::shape_calculator::calculate_depth_concatenate_shape(shapes); - } - else - { - ARM_COMPUTE_ERROR("Unsupported concatenation axis!"); - } + output_descriptor.shape = arm_compute::misc::shape_calculator::calculate_concatenate_shape(shapes, axis_idx); return output_descriptor; } |