aboutsummaryrefslogtreecommitdiff
path: root/src/graph/nodes/ConcatenateLayerNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph/nodes/ConcatenateLayerNode.cpp')
-rw-r--r--src/graph/nodes/ConcatenateLayerNode.cpp14
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;
}