aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/graph/nodes')
-rw-r--r--arm_compute/graph/nodes/EltwiseLayerNode.h40
-rw-r--r--arm_compute/graph/nodes/SplitLayerNode.h20
2 files changed, 52 insertions, 8 deletions
diff --git a/arm_compute/graph/nodes/EltwiseLayerNode.h b/arm_compute/graph/nodes/EltwiseLayerNode.h
index d619ad2588..9ea5d69ac9 100644
--- a/arm_compute/graph/nodes/EltwiseLayerNode.h
+++ b/arm_compute/graph/nodes/EltwiseLayerNode.h
@@ -63,6 +63,12 @@ public:
*/
ActivationLayerInfo fused_activation() const;
+ /** Returns output quantization info
+ *
+ * @return Output quantization info
+ */
+ QuantizationInfo output_quant_info() const;
+
/** Sets fused activation
*
* @param[in] fused_activation Fused activation to set
@@ -80,6 +86,40 @@ public:
private:
descriptors::EltwiseLayerDescriptor descriptor;
};
+
+/** Unary Eltwise Layer node */
+class UnaryEltwiseLayerNode final : public INode
+{
+public:
+ /** Constructor
+ *
+ * @param[in] descriptor Containing information for the node described in @ref descriptors::EltwiseLayerDescriptor
+ */
+ UnaryEltwiseLayerNode(const descriptors::UnaryEltwiseLayerDescriptor &descriptor);
+ /** Unary eltwise layer descriptor
+ *
+ * @return Unary eltwise layer descriptor which containing information
+ */
+ descriptors::UnaryEltwiseLayerDescriptor eltwise_descriptor() const;
+
+ /** Sets fused activation
+ *
+ * @param[in] fused_activation Fused activation to set
+ */
+ void set_fused_activation(ActivationLayerInfo fused_activation);
+
+ // Inherited overridden methods:
+ NodeType type() const override;
+ bool forward_descriptors() override;
+ TensorDescriptor configure_output(size_t idx) const override;
+ void accept(INodeVisitor &v) override;
+
+ static constexpr NodeType node_type = NodeType::UnaryEltwiseLayer;
+
+private:
+ descriptors::UnaryEltwiseLayerDescriptor descriptor;
+};
+
} // namespace graph
} // namespace arm_compute
#endif /* ARM_COMPUTE_GRAPH_ELTWISE_LAYER_NODE_H */
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