create_dl_layer_concatT_create_dl_layer_concatCreateDlLayerConcatCreateDlLayerConcatcreate_dl_layer_concat (Operator)

Name

create_dl_layer_concatT_create_dl_layer_concatCreateDlLayerConcatCreateDlLayerConcatcreate_dl_layer_concat — Create a concatenation layer.

Signature

create_dl_layer_concat( : : DLLayerInputs, LayerName, Axis, GenParamName, GenParamValue : DLLayerConcat)

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

void CreateDlLayerConcat(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 void HOperatorSet.CreateDlLayerConcat(HTuple DLLayerInputs, HTuple layerName, HTuple axis, HTuple genParamName, HTuple genParamValue, out HTuple DLLayerConcat)

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)

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

Description

The operator create_dl_layer_concatcreate_dl_layer_concatCreateDlLayerConcatCreateDlLayerConcatCreateDlLayerConcatcreate_dl_layer_concat creates a concatenation layer whose handle is returned in DLLayerConcatDLLayerConcatDLLayerConcatDLLayerConcatDLLayerConcatdllayer_concat.

The parameter DLLayerInputsDLLayerInputsDLLayerInputsDLLayerInputsDLLayerInputsdllayer_inputs determines the feeding input layers. This layer expects multiple layers as input.

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

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

'batch'"batch""batch""batch""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""batch_interleaved""batch_interleaved""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 1, the concatenation is identical for 'batch'"batch""batch""batch""batch""batch" and 'batch_interleaved'"batch_interleaved""batch_interleaved""batch_interleaved""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""depth""depth""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""height""height""height""height":

Concatenation is applied along the height-dimension.

'width'"width""width""width""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 GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and the corresponding values GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value are supported:

'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output""is_inference_output":

Determines whether apply_dl_modelapply_dl_modelApplyDlModelApplyDlModelApplyDlModelapply_dl_model will include the output of this layer in the dictionary DLResultBatchDLResultBatchDLResultBatchDLResultBatchDLResultBatchdlresult_batch even without specifying this layer in OutputsOutputsOutputsOutputsoutputsoutputs ('true'"true""true""true""true""true") or not ('false'"false""false""false""false""false").

Default: 'false'"false""false""false""false""false"

Certain parameters of layers created using this operator create_dl_layer_concatcreate_dl_layer_concatCreateDlLayerConcatCreateDlLayerConcatCreateDlLayerConcatcreate_dl_layer_concat can be set and retrieved using further operators. The following tables give an overview, which parameters can be set using set_dl_model_layer_paramset_dl_model_layer_paramSetDlModelLayerParamSetDlModelLayerParamSetDlModelLayerParamset_dl_model_layer_param and which ones can be retrieved using get_dl_model_layer_paramget_dl_model_layer_paramGetDlModelLayerParamGetDlModelLayerParamGetDlModelLayerParamget_dl_model_layer_param or get_dl_layer_paramget_dl_layer_paramGetDlLayerParamGetDlLayerParamGetDlLayerParamget_dl_layer_param. Note, the operators set_dl_model_layer_paramset_dl_model_layer_paramSetDlModelLayerParamSetDlModelLayerParamSetDlModelLayerParamset_dl_model_layer_param and get_dl_model_layer_paramget_dl_model_layer_paramGetDlModelLayerParamGetDlModelLayerParamGetDlModelLayerParamget_dl_model_layer_param require a model created by create_dl_modelcreate_dl_modelCreateDlModelCreateDlModelCreateDlModelcreate_dl_model.

Layer Parameters set get
'input_layer'"input_layer""input_layer""input_layer""input_layer""input_layer" (DLLayerInputsDLLayerInputsDLLayerInputsDLLayerInputsDLLayerInputsdllayer_inputs)
'name'"name""name""name""name""name" (LayerNameLayerNameLayerNameLayerNamelayerNamelayer_name)
'output_layer'"output_layer""output_layer""output_layer""output_layer""output_layer" (DLLayerConcatDLLayerConcatDLLayerConcatDLLayerConcatDLLayerConcatdllayer_concat)
'shape'"shape""shape""shape""shape""shape"
'type'"type""type""type""type""type"
Generic Layer Parameters set get
'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output""is_inference_output"
'num_trainable_params'"num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params"

Execution Information

Parameters

DLLayerInputsDLLayerInputsDLLayerInputsDLLayerInputsDLLayerInputsdllayer_inputs (input_control)  dl_layer(-array) HDlLayer, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Feeding input layers.

LayerNameLayerNameLayerNameLayerNamelayerNamelayer_name (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the output layer.

AxisAxisAxisAxisaxisaxis (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Dimension along which the input layers are concatenated.

Default value: 'depth' "depth" "depth" "depth" "depth" "depth"

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

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Generic input parameter names.

Default value: []

List of values: 'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output""is_inference_output"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control)  attribute.value(-array) HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Generic input parameter values.

Default value: []

Suggested values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"

DLLayerConcatDLLayerConcatDLLayerConcatDLLayerConcatDLLayerConcatdllayer_concat (output_control)  dl_layer HDlLayer, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Concatenation layer.

Module

Deep Learning Training