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_spaceCreateDlLayerDepthToSpaceCreateDlLayerDepthToSpacecreate_dl_layer_depth_to_space creates a depth to space layer whose handle is returned in DLLayerDepthToSpaceDLLayerDepthToSpaceDLLayerDepthToSpaceDLLayerDepthToSpacedllayer_depth_to_space.

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

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.

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 BlockSizeBlockSizeBlockSizeblockSizeblock_size.

The output element is mapped from the input element .

With ModeModeModemodemode 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" order described above is available.

Certain parameters of layers created using this operator create_dl_layer_depth_to_spacecreate_dl_layer_depth_to_spaceCreateDlLayerDepthToSpaceCreateDlLayerDepthToSpacecreate_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_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.

Layer Parameters set get
'input_layer'"input_layer""input_layer""input_layer""input_layer" (DLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input) x
'name'"name""name""name""name" (LayerNameLayerNameLayerNamelayerNamelayer_name) x x
'block_size'"block_size""block_size""block_size""block_size" (BlockSizeBlockSizeBlockSizeblockSizeblock_size) x
'shape'"shape""shape""shape""shape" x
'type'"type""type""type""type" x
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

Parameters

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

Feeding layer.

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

Name of the output layer.

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

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

Default: 3

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

Ordering mode.

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

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"

DLLayerDepthToSpaceDLLayerDepthToSpaceDLLayerDepthToSpaceDLLayerDepthToSpacedllayer_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_inputCreateDlLayerInputCreateDlLayerInputcreate_dl_layer_input, create_dl_layer_concatcreate_dl_layer_concatCreateDlLayerConcatCreateDlLayerConcatcreate_dl_layer_concat, create_dl_layer_reshapecreate_dl_layer_reshapeCreateDlLayerReshapeCreateDlLayerReshapecreate_dl_layer_reshape

Possible Successors

create_dl_layer_convolutioncreate_dl_layer_convolutionCreateDlLayerConvolutionCreateDlLayerConvolutioncreate_dl_layer_convolution, create_dl_layer_densecreate_dl_layer_denseCreateDlLayerDenseCreateDlLayerDensecreate_dl_layer_dense, create_dl_layer_reshapecreate_dl_layer_reshapeCreateDlLayerReshapeCreateDlLayerReshapecreate_dl_layer_reshape

See also

create_dl_layer_reshapecreate_dl_layer_reshapeCreateDlLayerReshapeCreateDlLayerReshapecreate_dl_layer_reshape

Module

Deep Learning Professional