aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/nodes/SplitLayerNode.h
diff options
context:
space:
mode:
authorSheri Zhang <sheri.zhang@arm.com>2020-05-27 15:03:48 +0100
committerSheri Zhang <sheri.zhang@arm.com>2020-06-16 13:12:48 +0000
commit16dddd2af57a71ca10d62a4412d014f859720d2c (patch)
tree6478e50fc7b72775f781562508bfaf87e6d935a9 /arm_compute/graph/nodes/SplitLayerNode.h
parentbcd2352d7fd99a2f6aab220fa0c3b3f3119a1a4c (diff)
downloadComputeLibrary-16dddd2af57a71ca10d62a4412d014f859720d2c.tar.gz
COMPMID-3381: Implement graph example for YoLo v3 output detector
Add sub/exp/splitv support in graph api Signed-off-by: Sheri Zhang <sheri.zhang@arm.com> Change-Id: I4e08cc19a46655717068b12c93d67e619a595d9a Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3309 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/graph/nodes/SplitLayerNode.h')
-rw-r--r--arm_compute/graph/nodes/SplitLayerNode.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/arm_compute/graph/nodes/SplitLayerNode.h b/arm_compute/graph/nodes/SplitLayerNode.h
index 345260ab84..b5dea7f8c5 100644
--- a/arm_compute/graph/nodes/SplitLayerNode.h
+++ b/arm_compute/graph/nodes/SplitLayerNode.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2019 ARM Limited.
+ * Copyright (c) 2018-2020 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -38,10 +38,13 @@ class SplitLayerNode final : public INode
public:
/** Default Constructor
*
- * @param[in] num_splits Number of splits
- * @param[in] axis (Optional) Axis to split on. Supported axis >= 2. Defaults to 0
+ * @param[in] num_splits Number of splits
+ * @param[in] axis (Optional) Axis to split on. Defaults to 0
+ * @param[in] size_splits (Optional) The sizes of each output tensor along the split dimension.
+ * Must sum to the dimension of value along split_dim.
+ * Can contain one -1 indicating that dimension is to be inferred.
*/
- SplitLayerNode(unsigned int num_splits, unsigned int axis = 0);
+ SplitLayerNode(unsigned int num_splits, int axis = 0, std::vector<int> size_splits = std::vector<int>());
/** Computes split layer output descriptor
*
* @param[in] input_descriptor Descriptor of the input tensor
@@ -51,8 +54,8 @@ public:
*
* @return A pair with the descriptor of the split and the starting coordinates
*/
- static std::pair<TensorDescriptor, Coordinates> compute_output_descriptor(const TensorDescriptor &input_descriptor,
- unsigned int num_splits, unsigned int axis, unsigned int idx);
+ std::pair<TensorDescriptor, Coordinates> compute_output_descriptor(const TensorDescriptor &input_descriptor,
+ unsigned int num_splits, int axis, unsigned int idx);
/** Number of splits accessor
*
* @return Number of splits
@@ -72,8 +75,9 @@ public:
void accept(INodeVisitor &v) override;
private:
- unsigned int _num_splits;
- unsigned int _axis;
+ unsigned int _num_splits;
+ int _axis;
+ std::vector<int> _size_splits;
};
} // namespace graph
} // namespace arm_compute