ONE - On-device Neural Engine
Loading...
Searching...
No Matches
ConcatSpec Class Reference

#include <ConcatSpec.h>

Public Member Functions

 ConcatSpec (uint32_t axis)
 
nncc::core::ADT::tensor::Shape forward (const ShapeList &) const
 Return the output shape when inputs of given shape are concatenated along _axis.
 

Detailed Description

Definition at line 26 of file ConcatSpec.h.

Constructor & Destructor Documentation

◆ ConcatSpec()

ConcatSpec::ConcatSpec ( uint32_t  axis)
inlineexplicit

Definition at line 29 of file ConcatSpec.h.

29 : _axis{axis}
30 {
31 // DO NOTHING
32 }

Member Function Documentation

◆ forward()

nncc::core::ADT::tensor::Shape ConcatSpec::forward ( const ShapeList inputs) const

Return the output shape when inputs of given shape are concatenated along _axis.

Definition at line 23 of file ConcatSpec.cpp.

24{
25 assert(inputs.size() > 0);
26
28
29 for (uint32_t n = 1; n < inputs.size(); ++n)
30 {
31 // The current implementation assumes that "inputs" is well-formed
32 // TODO Verify whether "inputs" is really well-formed
33 const auto &input_shape = inputs.at(n);
34 output_shape.dim(_axis) += input_shape.dim(_axis);
35 }
36
37 return output_shape;
38}
const luci_interpreter::RuntimeShape output_shape

References output_shape.


The documentation for this class was generated from the following files: