create_dl_layer_depth_to_spaceT_create_dl_layer_depth_to_spaceCreateDlLayerDepthToSpaceCreateDlLayerDepthToSpacecreate_dl_layer_depth_to_space (Operator)

Name

create_dl_layer_depth_to_spaceT_create_dl_layer_depth_to_spaceCreateDlLayerDepthToSpaceCreateDlLayerDepthToSpacecreate_dl_layer_depth_to_space — Create a depth to space layer.

Signature

create_dl_layer_depth_to_space( : : DLLayerInput, LayerName, BlockSize, Mode, GenParamName, GenParamValue : DLLayerDepthToSpace)

Herror T_create_dl_layer_depth_to_space(const Htuple DLLayerInput, const Htuple LayerName, const Htuple BlockSize, const Htuple Mode, const Htuple GenParamName, const Htuple GenParamValue, Htuple* DLLayerDepthToSpace)

void CreateDlLayerDepthToSpace(const HTuple& DLLayerInput, const HTuple& LayerName, const HTuple& BlockSize, const HTuple& Mode, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* DLLayerDepthToSpace)

HDlLayer HDlLayer::CreateDlLayerDepthToSpace(const HString& LayerName, Hlong BlockSize, const HString& Mode, const HTuple& GenParamName, const HTuple& GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerDepthToSpace(const HString& LayerName, Hlong BlockSize, const HString& Mode, const HString& GenParamName, const HString& GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerDepthToSpace(const char* LayerName, Hlong BlockSize, const char* Mode, const char* GenParamName, const char* GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerDepthToSpace(const wchar_t* LayerName, Hlong BlockSize, const wchar_t* Mode, const wchar_t* GenParamName, const wchar_t* GenParamValue) const   (Windows only)

static void HOperatorSet.CreateDlLayerDepthToSpace(HTuple DLLayerInput, HTuple layerName, HTuple blockSize, HTuple mode, HTuple genParamName, HTuple genParamValue, out HTuple DLLayerDepthToSpace)

HDlLayer HDlLayer.CreateDlLayerDepthToSpace(string layerName, int blockSize, string mode, HTuple genParamName, HTuple genParamValue)

HDlLayer HDlLayer.CreateDlLayerDepthToSpace(string layerName, int blockSize, string mode, string genParamName, string genParamValue)

def create_dl_layer_depth_to_space(dllayer_input: HHandle, layer_name: str, block_size: int, mode: str, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, float, str]]) -> HHandle

Description

The operator create_dl_layer_depth_to_spacecreate_dl_layer_depth_to_spaceCreateDlLayerDepthToSpaceCreateDlLayerDepthToSpaceCreateDlLayerDepthToSpacecreate_dl_layer_depth_to_space creates a depth to space layer whose handle is returned in DLLayerDepthToSpaceDLLayerDepthToSpaceDLLayerDepthToSpaceDLLayerDepthToSpaceDLLayerDepthToSpacedllayer_depth_to_space.

The parameter DLLayerInputDLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input determines the feeding input layer and expects the layer handle as value.

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.

This layer rearranges the elements of the feeding tensor of shape to a tensor of shape . Thereby can be considered an upscale factor, which is set with BlockSizeBlockSizeBlockSizeBlockSizeblockSizeblock_size.

The output element is mapped from the input element .

With ModeModeModeModemodemode the ordering in the output tensor is set. Currently only the 'column_row_depth'"column_row_depth""column_row_depth""column_row_depth""column_row_depth""column_row_depth" order described above is available.

Certain parameters of layers created using this operator create_dl_layer_depth_to_spacecreate_dl_layer_depth_to_spaceCreateDlLayerDepthToSpaceCreateDlLayerDepthToSpaceCreateDlLayerDepthToSpacecreate_dl_layer_depth_to_space 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" (DLLayerInputDLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input)
'name'"name""name""name""name""name" (LayerNameLayerNameLayerNameLayerNamelayerNamelayer_name)
'block_size'"block_size""block_size""block_size""block_size""block_size" (BlockSizeBlockSizeBlockSizeBlockSizeblockSizeblock_size)
'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

DLLayerInputDLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input (input_control)  dl_layer HDlLayer, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Feeding layer.

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

Name of the output layer.

BlockSizeBlockSizeBlockSizeBlockSizeblockSizeblock_size (input_control)  number HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Block size (i.e., upscale factor).

Default value: 3

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

Ordering mode.

Default value: 'column_row_depth' "column_row_depth" "column_row_depth" "column_row_depth" "column_row_depth" "column_row_depth"

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"

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

Depth to space layer.

Example (HDevelop)

InputShape := [16, 16, 3]
Upscale := 2
*
create_dl_layer_input ('input', InputShape, [], [], DLLayerInput)
* Create a convolutional layer, that generates Upscale^2*NumChannel feature maps.
create_dl_layer_convolution (DLLayerInput, 'conv1', 3, 1, 1,\
                             Upscale * Upscale * InputShape[2],\
                             1, 'half_kernel_size', 'none',\
                             [],  [], DLLayerConvolution)
* Use a depth to space layer to combine Upscale^2 feature maps to upscale.
create_dl_layer_depth_to_space (DLLayerConvolution, 'upscaled', Upscale,\
                                'column_row_depth',[], [],\
                                DLLayerDepthToSpace)
* The output shape of DLLayerDepthToSpace is now [16*Upscale, 16*Upscale, 3].
create_dl_model (DLLayerDepthToSpace, DLModel)

Possible Predecessors

create_dl_layer_inputcreate_dl_layer_inputCreateDlLayerInputCreateDlLayerInputCreateDlLayerInputcreate_dl_layer_input, create_dl_layer_concatcreate_dl_layer_concatCreateDlLayerConcatCreateDlLayerConcatCreateDlLayerConcatcreate_dl_layer_concat, create_dl_layer_reshapecreate_dl_layer_reshapeCreateDlLayerReshapeCreateDlLayerReshapeCreateDlLayerReshapecreate_dl_layer_reshape

Possible Successors

create_dl_layer_convolutioncreate_dl_layer_convolutionCreateDlLayerConvolutionCreateDlLayerConvolutionCreateDlLayerConvolutioncreate_dl_layer_convolution, create_dl_layer_densecreate_dl_layer_denseCreateDlLayerDenseCreateDlLayerDenseCreateDlLayerDensecreate_dl_layer_dense, create_dl_layer_reshapecreate_dl_layer_reshapeCreateDlLayerReshapeCreateDlLayerReshapeCreateDlLayerReshapecreate_dl_layer_reshape

See also

create_dl_layer_reshapecreate_dl_layer_reshapeCreateDlLayerReshapeCreateDlLayerReshapeCreateDlLayerReshapecreate_dl_layer_reshape

Module

Deep Learning Training