clDNN
cldnn::concatenation Struct Reference

#include <concatenation.hpp>

Inheritance diagram for cldnn::concatenation:
Collaboration diagram for cldnn::concatenation:

Public Types

enum  concatenation_axis { along_b = cldnn_concatenation_along_b, along_f = cldnn_concatenation_along_f, along_x = cldnn_concatenation_along_x, along_y = cldnn_concatenation_along_y }
 
typedef cldnn_concatenation_desc dto
 

Public Member Functions

 concatenation (const primitive_id &id, const std::vector< primitive_id > &input, const concatenation_axis axis, const padding &output_padding=padding())
 
 concatenation (const dto *dto)
 Constructs a copy from C API (depth_concatenate)
 
- Public Member Functions inherited from cldnn::primitive_base< concatenation, cldnn_concatenation_desc >
const cldnn_primitive_descget_dto () const override
 Returns pointer to a C API primitive descriptor casted to cldnn_primitive_desc.
 
- Public Member Functions inherited from cldnn::primitive
 primitive (const primitive_type_id &type, const primitive_id &id, const std::vector< primitive_id > &input, const padding &output_padding=padding())
 
 primitive (const cldnn_primitive_desc *dto)
 Constructs a copy from basic C API cldnn_primitive_desc.
 
std::vector< std::reference_wrapper< primitive_id > > dependecies ()
 Returns references to all primitive ids on which this primitive depends - inputs, weights, biases, etc.
 
std::vector< primitive_iddependecies () const
 Returns copy of all primitive ids on which this primitive depends - inputs, weights, biases, etc.
 
 operator primitive_id () const
 Implicit conversion to primiitive id.
 

Static Public Member Functions

static primitive_type_id type_id ()
 

Public Attributes

concatenation_axis axis
 Dimension along which concatenation should take place.
 
- Public Attributes inherited from cldnn::primitive
const primitive_type_id type
 Primitive's type id.
 
const primitive_id id
 Primitive's id.
 
fixed_size_vector_ref input
 List of ids of input primitives.
 
padding output_padding
 Requested output padding.
 

Additional Inherited Members

- Protected Member Functions inherited from cldnn::primitive_base< concatenation, cldnn_concatenation_desc >
 primitive_base (const primitive_id &id, const std::vector< primitive_id > &input, const padding &output_padding=padding())
 
 primitive_base (const cldnn_concatenation_desc *dto)
 
- Protected Member Functions inherited from cldnn::primitive
virtual std::vector< std::reference_wrapper< const primitive_id > > get_dependencies () const
 
- Protected Attributes inherited from cldnn::primitive
primitive_id_arr _input
 

Detailed Description

Concatenation is used to concatenate multiple sources into one destination along specified dimension.

  • all other dimensions (except the one along which concatenation take place) must have the same value in each source.
  • order of arguments in primitive creation has impact on order of feature maps in output primitive.
Alogrithm:
int outputIdx = 0
for(i : input)
{
for(f : i.features)
{
output[outputIdx] = f
outputIdx += 1
}
}
Where:
  • input : data structure holding all source inputs for this primitive
  • output : data structure holding output data for this primitive
  • i.features : number of features in currently processed input
  • outputIdx : index of destination feature

Definition at line 53 of file concatenation.hpp.

Constructor & Destructor Documentation

◆ concatenation()

cldnn::concatenation::concatenation ( const primitive_id id,
const std::vector< primitive_id > &  input,
const concatenation_axis  axis,
const padding output_padding = padding() 
)
inline
  • Constructs concatenation primitive.
    Parameters
    idThis primitive id.
    inputVector of input primitives ids.
    axisSelected dimension for concatenation.

Definition at line 69 of file concatenation.hpp.


The documentation for this struct was generated from the following file: