39 : _total_nodes(total_nodes), _axis(axis)
58 const unsigned int num_tensors = input_descriptors.size();
62 return output_descriptor;
83 bool are_all_inputs_set = std::all_of(std::begin(_input_edges),
std::end(_input_edges), [](
const EdgeID & eid)
90 if(are_all_inputs_set)
92 std::vector<TensorDescriptor> inputs_descriptors;
93 for(
unsigned int i = 0; i < _input_edges.size(); ++i)
97 inputs_descriptors.push_back(t->
desc());
TensorShape compute_stack_shape(const ITensorInfo &a, unsigned int axis, unsigned int num_tensors)
Calculate the stack output shape of a tensor.
static TensorDescriptor compute_output_descriptor(const std::vector< TensorDescriptor > &input_descriptors, int axis)
Computes stack output descriptor.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
NodeType type() const override
Returns node's type.
bool forward_descriptors() override
Forwards descriptor information to outputs if possible.
StackLayerNode(unsigned int total_nodes, int axis)
Constructor.
Copyright (c) 2017-2021 Arm Limited.
TensorDescriptor & desc()
TensorInfo metadata accessor.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
virtual void visit(INode &n)=0
Visit INode.
Tensor * output(size_t idx) const
Returns the tensor of a given output of the node.
TensorID input_id(size_t idx) const
Returns the tensor ID of a given input of the node.
void end(TokenStream &in, bool &valid)
constexpr EdgeID EmptyEdgeID
int axis() const
Stack axis parameter accessor.
TensorDescriptor configure_output(size_t idx) const override
Calculates output configuration.
Store the tensor's metadata.
constexpr TensorID NullTensorID
Constant NodeID specifying an equivalent of null node.
void accept(INodeVisitor &v) override
Accepts a node visitor.