Skip to content

create_dl_layer_concatCreateDlLayerConcatCreateDlLayerConcatcreate_dl_layer_concatT_create_dl_layer_concat🔗

Short description🔗

create_dl_layer_concatCreateDlLayerConcatCreateDlLayerConcatcreate_dl_layer_concatT_create_dl_layer_concat — Create a concatenation layer.

Signature🔗

create_dl_layer_concat( dl_layer DLLayerInputs, string LayerName, string Axis, attribute.name GenParamName, attribute.value GenParamValue, out dl_layer DLLayerConcat )void CreateDlLayerConcat( const HTuple& DLLayerInputs, const HTuple& LayerName, const HTuple& Axis, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* DLLayerConcat )static void HOperatorSet.CreateDlLayerConcat( HTuple DLLayerInputs, HTuple layerName, HTuple axis, HTuple genParamName, HTuple genParamValue, out HTuple DLLayerConcat )def create_dl_layer_concat( dllayer_inputs: MaybeSequence[HHandle], layer_name: str, axis: str, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, float, str]] ) -> HHandle

Herror T_create_dl_layer_concat( const Htuple DLLayerInputs, const Htuple LayerName, const Htuple Axis, const Htuple GenParamName, const Htuple GenParamValue, Htuple* DLLayerConcat )

static HDlLayer HDlLayer::CreateDlLayerConcat( const HDlLayerArray& DLLayerInputs, const HString& LayerName, const HString& Axis, const HTuple& GenParamName, const HTuple& GenParamValue )

HDlLayer HDlLayer::CreateDlLayerConcat( const HString& LayerName, const HString& Axis, const HString& GenParamName, const HString& GenParamValue ) const

HDlLayer HDlLayer::CreateDlLayerConcat( const char* LayerName, const char* Axis, const char* GenParamName, const char* GenParamValue ) const

HDlLayer HDlLayer::CreateDlLayerConcat( const wchar_t* LayerName, const wchar_t* Axis, const wchar_t* GenParamName, const wchar_t* GenParamValue ) const (Windows only)

static HDlLayer HDlLayer.CreateDlLayerConcat( HDlLayer[] DLLayerInputs, string layerName, string axis, HTuple genParamName, HTuple genParamValue )

HDlLayer HDlLayer.CreateDlLayerConcat( string layerName, string axis, string genParamName, string genParamValue )

Description🔗

The operator create_dl_layer_concatCreateDlLayerConcat creates a concatenation layer whose handle is returned in DLLayerConcatDLLayerConcatdllayer_concat.

The parameter DLLayerInputsDLLayerInputsdllayer_inputs determines the feeding input layers. This layer expects at least one layer as input.

The parameter LayerNamelayerNamelayer_name sets an individual layer name. Note that if creating a model using create_dl_modelCreateDlModel each layer of the created network must have a unique name.

A concatenation layer concatenates the data tensors of the input layers in DLLayerInputsDLLayerInputsdllayer_inputs and returns a single data tensor DLLayerConcatDLLayerConcatdllayer_concat. The parameter Axisaxisaxis specifies along which dimension the inputs should be concatenated. The supported options for Axisaxisaxis are:

  • 'batch'"batch": Concatenation is applied along the batch-dimension.

    Example: if you concatenate two inputs A and B of shape (h, w, d, b) = (1, 1, 1, 2), where A = [A0, A1] and B = [B0, B1], you obtain the output [A0, A1, B0, B1] with shape (1, 1, 1, 4).

  • 'batch_interleaved'"batch_interleaved": Concatenation is applied along the depth-dimension, but the output is reshaped as if the data was concatenated along the batch-dimension. For this dimension, all inputs need to have exactly the same shape.

    Note that when the input batch_size is 11, the concatenation is identical for 'batch'"batch" and 'batch_interleaved'"batch_interleaved".

    Example: if you concatenate two inputs A and B of shape (h, w, d, b) = (1, 1, 1, 2), where A = [A0, A1] and B = [B0, B1], you obtain the output [A0, B0, A1, B1] with shape (1, 1, 1, 4).

  • 'depth'"depth": Concatenation is applied along the depth-dimension.

    Example: if you concatenate two inputs A and B of shape (h, w, d, b) = (1, 1, 1, 2), where A = [A0, A1] and B = [B0, B1], you obtain the output [A0, A1, B0, B1] with shape (1, 1, 2, 2).

  • 'height'"height": Concatenation is applied along the height-dimension.

  • 'width'"width": Concatenation is applied along the width-dimension.

Note that all non-concatenated dimensions must be equal for all input data tensors.

The following generic parameters GenParamNamegenParamNamegen_param_name and the corresponding values GenParamValuegenParamValuegen_param_value are supported:

  • 'is_inference_output'"is_inference_output": Determines whether apply_dl_modelApplyDlModel will include the output of this layer in the dictionary DLResultBatchDLResultBatchdlresult_batch even without specifying this layer in Outputsoutputsoutputs ('true'"true") or not ('false'"false").

    Default: 'false'"false"

Certain parameters of layers created using this operator create_dl_layer_concatCreateDlLayerConcat can be set and retrieved using further operators. The following tables give an overview, which parameters can be set using set_dl_model_layer_paramSetDlModelLayerParam and which ones can be retrieved using get_dl_model_layer_paramGetDlModelLayerParam or get_dl_layer_paramGetDlLayerParam. Note, the operators set_dl_model_layer_paramSetDlModelLayerParam and get_dl_model_layer_paramGetDlModelLayerParam require a model created by create_dl_modelCreateDlModel.

Layer Parameters set get
'input_layer'"input_layer" (DLLayerInputsDLLayerInputsdllayer_inputs) x
'name'"name" (LayerNamelayerNamelayer_name) x x
'output_layer'"output_layer" (DLLayerConcatDLLayerConcatdllayer_concat) x
'shape'"shape" x
'type'"type" x
Generic Layer Parameters set get
'is_inference_output'"is_inference_output" x x
'num_trainable_params'"num_trainable_params" x

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

DLLayerInputsDLLayerInputsdllayer_inputs (input_control) dl_layer(-array) → (handle)HTuple (HHandle)HDlLayer, HTuple (IntPtr)MaybeSequence[HHandle]Htuple (handle)

Feeding input layers.

LayerNamelayerNamelayer_name (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the output layer.

Axisaxisaxis (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Dimension along which the input layers are concatenated.

Default: 'depth'"depth"
List of values: 'batch', 'batch_interleaved', 'depth', 'height', 'width'"batch", "batch_interleaved", "depth", "height", "width"

GenParamNamegenParamNamegen_param_name (input_control) attribute.name(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

Generic input parameter names.

Default: [][]
List of values: 'is_inference_output'"is_inference_output"

GenParamValuegenParamValuegen_param_value (input_control) attribute.value(-array) → (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)MaybeSequence[Union[int, float, str]]Htuple (char* / Hlong / double)

Generic input parameter values.

Default: [][]
Suggested values: 'true', 'false'"true", "false"

DLLayerConcatDLLayerConcatdllayer_concat (output_control) dl_layer → (handle)HTuple (HHandle)HDlLayer, HTuple (IntPtr)HHandleHtuple (handle)

Concatenation layer.

Module🔗

Deep Learning Professional