24.02.1
|
Concatenation Layer node. More...
#include <ConcatenateLayerNode.h>
Public Member Functions | |
ConcatenateLayerNode (unsigned int total_nodes, descriptors::ConcatLayerDescriptor concat_descriptor) | |
Constructor. More... | |
void | set_enabled (bool is_enabled) |
Disables or not the depth concatenate node. More... | |
bool | is_enabled () const |
Enabled parameter accessor. More... | |
DataLayoutDimension | concatenation_axis () const |
Concatenation axis parameter accessor. More... | |
QuantizationInfo | output_quantization_info () const |
Concatenation output quantization info accessor. More... | |
NodeType | type () const override |
Returns node's type. More... | |
bool | forward_descriptors () override |
Forwards descriptor information to outputs if possible. More... | |
TensorDescriptor | configure_output (size_t idx) const override |
Calculates output configuration. More... | |
void | accept (INodeVisitor &v) override |
Accepts a node visitor. More... | |
Public Member Functions inherited from INode | |
INode () | |
Constructor. More... | |
virtual | ~INode ()=default |
Destructor. More... | |
INode (const INode &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
INode & | operator= (const INode &)=delete |
Prevent instances of this class from being copy assigned (As this class contains pointers) More... | |
INode (INode &&)=default | |
Allow instances of this class to be moved. More... | |
INode & | operator= (INode &&)=default |
Allow instances of this class to be move assigned. More... | |
virtual Status | validate () const |
Validate node. More... | |
std::string | name () const |
Returns node's name. More... | |
NodeID | id () const |
Returns node's ID. More... | |
const Graph * | graph () const |
Returns node's Graph. More... | |
Graph * | graph () |
Returns node's Graph. More... | |
void | set_graph (Graph *g) |
Sets the graph that this node is registered to. More... | |
void | set_id (NodeID id) |
Sets the node id. More... | |
void | set_common_node_parameters (NodeParams common_params) |
Sets common node parameters. More... | |
void | set_requested_target (Target target) |
Sets target preference. More... | |
void | set_assigned_target (Target target) |
Sets the final execution target. More... | |
void | set_output_tensor (TensorID tid, size_t idx) |
Sets the output tensor of at a given index. More... | |
const std::vector< TensorID > & | inputs () const |
Returns inputs of the node. More... | |
const std::vector< TensorID > & | outputs () const |
Returns outputs of the node. More... | |
const std::vector< EdgeID > & | input_edges () const |
Returns input edge set. More... | |
const std::set< EdgeID > & | output_edges () const |
Returns output edge set. More... | |
TensorID | input_id (size_t idx) const |
Returns the tensor ID of a given input of the node. More... | |
TensorID | output_id (size_t idx) const |
Returns the tensor ID of a given output of the node. More... | |
Tensor * | input (size_t idx) const |
Returns the tensor of a given input of the node. More... | |
Tensor * | output (size_t idx) const |
Returns the tensor of a given output of the node. More... | |
EdgeID | input_edge_id (size_t idx) const |
Returns the edge ID of a given input of the node. More... | |
Edge * | input_edge (size_t idx) const |
Returns the edge of a given input of the node. More... | |
size_t | num_inputs () const |
Returns number of inputs of the node. More... | |
size_t | num_outputs () const |
Returns number of outputs of the node. More... | |
NodeParams | common_node_params () const |
Returns common node parameters. More... | |
Target | requested_target () const |
Returns requested target for this node. More... | |
Target | assigned_target () const |
Returns assigned target for this node. More... | |
Static Public Member Functions | |
static TensorDescriptor | compute_output_descriptor (const std::vector< TensorDescriptor > &input_descriptors, DataLayoutDimension axis) |
Computes concatenations output descriptor. More... | |
Concatenation Layer node.
Definition at line 34 of file ConcatenateLayerNode.h.
ConcatenateLayerNode | ( | unsigned int | total_nodes, |
descriptors::ConcatLayerDescriptor | concat_descriptor | ||
) |
Constructor.
[in] | total_nodes | Number of nodes that will get concatenated |
[in] | concat_descriptor | Concatenate Layer Descriptor |
Definition at line 36 of file ConcatenateLayerNode.cpp.
References arm_compute::graph::EmptyEdgeID, and arm_compute::graph::NullTensorID.
|
overridevirtual |
Accepts a node visitor.
[in] | v | Visitor to accept |
Implements INode.
Definition at line 133 of file ConcatenateLayerNode.cpp.
References INodeVisitor::visit().
|
static |
Computes concatenations output descriptor.
[in] | input_descriptors | Input descriptors |
[in] | axis | Concatenation axis |
Definition at line 64 of file ConcatenateLayerNode.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_MSG, arm_compute::misc::shape_calculator::calculate_concatenate_shape(), arm_compute::graph::get_dimension_idx(), TensorDescriptor::layout, and TensorDescriptor::shape.
Referenced by ConcatenateLayerNode::configure_output().
DataLayoutDimension concatenation_axis | ( | ) | const |
Concatenation axis parameter accessor.
Definition at line 54 of file ConcatenateLayerNode.cpp.
References ConcatLayerDescriptor::axis.
Referenced by arm_compute::graph::backends::detail::create_concatenate_layer(), and DotGraphVisitor::visit().
|
overridevirtual |
Calculates output configuration.
[in] | idx | Output index to configure |
Implements INode.
Definition at line 98 of file ConcatenateLayerNode.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_UNUSED, ConcatLayerDescriptor::axis, ConcatenateLayerNode::compute_output_descriptor(), QuantizationInfo::empty(), arm_compute::graph::EmptyEdgeID, arm_compute::mlgo::parser::end(), INode::input_id(), arm_compute::test::validation::output_info, ConcatLayerDescriptor::output_qinfo, and tf_frozen_model_extractor::t.
Referenced by ConcatenateLayerNode::forward_descriptors().
|
overridevirtual |
Forwards descriptor information to outputs if possible.
Implements INode.
Definition at line 86 of file ConcatenateLayerNode.cpp.
References ARM_COMPUTE_ERROR_ON, ConcatenateLayerNode::configure_output(), arm_compute::test::validation::dst, arm_compute::graph::NullTensorID, and INode::output().
bool is_enabled | ( | ) | const |
Enabled parameter accessor.
Definition at line 49 of file ConcatenateLayerNode.cpp.
Referenced by arm_compute::graph::backends::detail::create_concatenate_layer(), ConcatenateLayerNode::set_enabled(), and DotGraphVisitor::visit().
QuantizationInfo output_quantization_info | ( | ) | const |
Concatenation output quantization info accessor.
Definition at line 59 of file ConcatenateLayerNode.cpp.
References ConcatLayerDescriptor::output_qinfo.
void set_enabled | ( | bool | is_enabled | ) |
Disables or not the depth concatenate node.
[in] | is_enabled | If true a backend function is created to perform the concatenation (involves copying), while if false, no function is created and we assume that sub-tensors are properly set to simulate a zero copy operation. |
Definition at line 44 of file ConcatenateLayerNode.cpp.
References ConcatenateLayerNode::is_enabled().
|
overridevirtual |
Returns node's type.
Implements INode.
Definition at line 128 of file ConcatenateLayerNode.cpp.
References arm_compute::graph::ConcatenateLayer.
Referenced by arm_compute::graph::backends::detail::create_concatenate_layer().