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
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)
Description
The operator create_dl_layer_concatcreate_dl_layer_concatCreateDlLayerConcatCreateDlLayerConcatcreate_dl_layer_concat
creates a concatenation layer
whose handle is returned in DLLayerConcatDLLayerConcatDLLayerConcatDLLayerConcatdllayer_concat
.
The parameter DLLayerInputsDLLayerInputsDLLayerInputsDLLayerInputsdllayer_inputs
determines the feeding input layers.
This layer expects multiple layers as input.
The parameter LayerNameLayerNameLayerNamelayerNamelayer_name
sets an individual layer name.
Note that if creating a model using create_dl_modelcreate_dl_modelCreateDlModelCreateDlModelcreate_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 DLLayerInputsDLLayerInputsDLLayerInputsDLLayerInputsdllayer_inputs
and returns a single data tensor
DLLayerConcatDLLayerConcatDLLayerConcatDLLayerConcatdllayer_concat
.
The parameter AxisAxisAxisaxisaxis
specifies along which dimension the
inputs should be concatenated. The supported options for AxisAxisAxisaxisaxis
are:
- '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":
-
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" and
'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":
-
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":
Concatenation is applied along the
height
-dimension.
- '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 GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
and the corresponding
values GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
are supported:
- 'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output":
-
Determines whether apply_dl_modelapply_dl_modelApplyDlModelApplyDlModelapply_dl_model
will include the output of this
layer in the dictionary DLResultBatchDLResultBatchDLResultBatchDLResultBatchdlresult_batch
even without specifying
this layer in OutputsOutputsOutputsoutputsoutputs
('true'"true""true""true""true") or not
('false'"false""false""false""false").
Default: 'false'"false""false""false""false"
Certain parameters of layers created using this operator
create_dl_layer_concatcreate_dl_layer_concatCreateDlLayerConcatCreateDlLayerConcatcreate_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_paramSetDlModelLayerParamSetDlModelLayerParamset_dl_model_layer_param
and which ones can be retrieved
using get_dl_model_layer_paramget_dl_model_layer_paramGetDlModelLayerParamGetDlModelLayerParamget_dl_model_layer_param
or get_dl_layer_paramget_dl_layer_paramGetDlLayerParamGetDlLayerParamget_dl_layer_param
.
Note, the operators set_dl_model_layer_paramset_dl_model_layer_paramSetDlModelLayerParamSetDlModelLayerParamset_dl_model_layer_param
and
get_dl_model_layer_paramget_dl_model_layer_paramGetDlModelLayerParamGetDlModelLayerParamget_dl_model_layer_param
require a model created by
create_dl_modelcreate_dl_modelCreateDlModelCreateDlModelcreate_dl_model
.
Generic Layer Parameters |
set |
get |
'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output" |
x |
x
|
'num_trainable_params'"num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params" |
|
x
|
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
DLLayerInputsDLLayerInputsDLLayerInputsDLLayerInputsdllayer_inputs
(input_control) dl_layer(-array) →
HDlLayer, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Feeding input layers.
LayerNameLayerNameLayerNamelayerNamelayer_name
(input_control) string →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Name of the output layer.
AxisAxisAxisaxisaxis
(input_control) string →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Dimension along which the input layers are concatenated.
Default:
'depth'
"depth"
"depth"
"depth"
"depth"
List of values:
'batch'"batch""batch""batch""batch", 'batch_interleaved'"batch_interleaved""batch_interleaved""batch_interleaved""batch_interleaved", 'depth'"depth""depth""depth""depth", 'height'"height""height""height""height", 'width'"width""width""width""width"
GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
(input_control) attribute.name(-array) →
HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Generic input parameter names.
Default:
[]
List of values:
'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output"
GenParamValueGenParamValueGenParamValuegenParamValuegen_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:
[]
Suggested values:
'true'"true""true""true""true", 'false'"false""false""false""false"
DLLayerConcatDLLayerConcatDLLayerConcatDLLayerConcatdllayer_concat
(output_control) dl_layer →
HDlLayer, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Concatenation layer.
Module
Deep Learning Training