create_dl_layer_transposed_convolutionT_create_dl_layer_transposed_convolutionCreateDlLayerTransposedConvolutionCreateDlLayerTransposedConvolutioncreate_dl_layer_transposed_convolution (Operator)

Name

create_dl_layer_transposed_convolutionT_create_dl_layer_transposed_convolutionCreateDlLayerTransposedConvolutionCreateDlLayerTransposedConvolutioncreate_dl_layer_transposed_convolution — Create a transposed convolution layer.

Signature

create_dl_layer_transposed_convolution( : : DLLayerInput, LayerName, KernelSize, Stride, KernelDepth, Groups, Padding, GenParamName, GenParamValue : DLLayerTransposedConvolution)

Herror T_create_dl_layer_transposed_convolution(const Htuple DLLayerInput, const Htuple LayerName, const Htuple KernelSize, const Htuple Stride, const Htuple KernelDepth, const Htuple Groups, const Htuple Padding, const Htuple GenParamName, const Htuple GenParamValue, Htuple* DLLayerTransposedConvolution)

void CreateDlLayerTransposedConvolution(const HTuple& DLLayerInput, const HTuple& LayerName, const HTuple& KernelSize, const HTuple& Stride, const HTuple& KernelDepth, const HTuple& Groups, const HTuple& Padding, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* DLLayerTransposedConvolution)

HDlLayer HDlLayer::CreateDlLayerTransposedConvolution(const HString& LayerName, Hlong KernelSize, Hlong Stride, Hlong KernelDepth, Hlong Groups, const HTuple& Padding, const HTuple& GenParamName, const HTuple& GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerTransposedConvolution(const HString& LayerName, Hlong KernelSize, Hlong Stride, Hlong KernelDepth, Hlong Groups, const HString& Padding, const HString& GenParamName, const HString& GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerTransposedConvolution(const char* LayerName, Hlong KernelSize, Hlong Stride, Hlong KernelDepth, Hlong Groups, const char* Padding, const char* GenParamName, const char* GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerTransposedConvolution(const wchar_t* LayerName, Hlong KernelSize, Hlong Stride, Hlong KernelDepth, Hlong Groups, const wchar_t* Padding, const wchar_t* GenParamName, const wchar_t* GenParamValue) const   (Windows only)

static void HOperatorSet.CreateDlLayerTransposedConvolution(HTuple DLLayerInput, HTuple layerName, HTuple kernelSize, HTuple stride, HTuple kernelDepth, HTuple groups, HTuple padding, HTuple genParamName, HTuple genParamValue, out HTuple DLLayerTransposedConvolution)

HDlLayer HDlLayer.CreateDlLayerTransposedConvolution(string layerName, int kernelSize, int stride, int kernelDepth, int groups, HTuple padding, HTuple genParamName, HTuple genParamValue)

HDlLayer HDlLayer.CreateDlLayerTransposedConvolution(string layerName, int kernelSize, int stride, int kernelDepth, int groups, string padding, string genParamName, string genParamValue)

def create_dl_layer_transposed_convolution(dllayer_input: HHandle, layer_name: str, kernel_size: int, stride: int, kernel_depth: int, groups: int, padding: MaybeSequence[Union[str, int]], gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, float, str]]) -> HHandle

Description

The operator create_dl_layer_transposed_convolutioncreate_dl_layer_transposed_convolutionCreateDlLayerTransposedConvolutionCreateDlLayerTransposedConvolutionCreateDlLayerTransposedConvolutioncreate_dl_layer_transposed_convolution creates a transposed convolution layer whose handle is returned in DLLayerTransposedConvolutionDLLayerTransposedConvolutionDLLayerTransposedConvolutionDLLayerTransposedConvolutionDLLayerTransposedConvolutiondllayer_transposed_convolution.

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.

The parameter KernelSizeKernelSizeKernelSizeKernelSizekernelSizekernel_size specifies the filter kernel in the dimensions width and height. So far, only quadratic kernels are supported.

Restriction: This value must be a tuple of length 1.

The parameter StrideStrideStrideStridestridestride determines how the filter is shifted in row and column direction.

Restriction: This value must be a tuple of length 1.

The parameter KernelDepthKernelDepthKernelDepthKernelDepthkernelDepthkernel_depth defines the depth of the output feature maps.

Restriction: This value must be a tuple of length 1.

The parameter GroupsGroupsGroupsGroupsgroupsgroups determines the amount of filter groups. So far, only a single filter group is supported.

Restriction: This value must be a tuple of length 1.

The parameter PaddingPaddingPaddingPaddingpaddingpadding effectively appends pixels with value 0 to each border of the input. This is set so that a convolutional layer and a transposed convolution layer with the same KernelSizeKernelSizeKernelSizeKernelSizekernelSizekernel_size, StrideStrideStrideStridestridestride and PaddingPaddingPaddingPaddingpaddingpadding values are inverses of each other regarding their input and output shapes. Supported PaddingPaddingPaddingPaddingpaddingpadding values are:

So far, the transposed convolution layer does not support bias terms.

The following generic parameters GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and the corresponding values GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value are supported:

'bias_term'"bias_term""bias_term""bias_term""bias_term""bias_term":

Determines, whether the layer has bias terms. As mentioned above, bias terms are not supported yet, so this value is only retrievable.

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

'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"

'learning_rate_multiplier'"learning_rate_multiplier""learning_rate_multiplier""learning_rate_multiplier""learning_rate_multiplier""learning_rate_multiplier":

Learning rate multiplier for this layer that is used during training. If 'learning_rate_multiplier'"learning_rate_multiplier""learning_rate_multiplier""learning_rate_multiplier""learning_rate_multiplier""learning_rate_multiplier" is set to 0.0, the layer is skipped during training.

Default: 1.0

'weight_filler'"weight_filler""weight_filler""weight_filler""weight_filler""weight_filler":

Defines the mode how the weights are initialized. See create_dl_layer_convolutioncreate_dl_layer_convolutionCreateDlLayerConvolutionCreateDlLayerConvolutionCreateDlLayerConvolutioncreate_dl_layer_convolution for a detailed explanation of this parameter and its values.

List of values: 'xavier'"xavier""xavier""xavier""xavier""xavier", 'msra'"msra""msra""msra""msra""msra", 'const'"const""const""const""const""const"

Default: 'xavier'"xavier""xavier""xavier""xavier""xavier"

'weight_filler_const_val'"weight_filler_const_val""weight_filler_const_val""weight_filler_const_val""weight_filler_const_val""weight_filler_const_val":

See create_dl_layer_convolutioncreate_dl_layer_convolutionCreateDlLayerConvolutionCreateDlLayerConvolutionCreateDlLayerConvolutioncreate_dl_layer_convolution for a detailed explanation of this parameter and its values.

Default: 0.5

'weight_filler_variance_norm'"weight_filler_variance_norm""weight_filler_variance_norm""weight_filler_variance_norm""weight_filler_variance_norm""weight_filler_variance_norm":

Value range for 'weight_filler'"weight_filler""weight_filler""weight_filler""weight_filler""weight_filler". See create_dl_layer_convolutioncreate_dl_layer_convolutionCreateDlLayerConvolutionCreateDlLayerConvolutionCreateDlLayerConvolutioncreate_dl_layer_convolution for a detailed explanation of this parameter and its values.

List of values: 'norm_average'"norm_average""norm_average""norm_average""norm_average""norm_average", 'norm_in'"norm_in""norm_in""norm_in""norm_in""norm_in", 'norm_out'"norm_out""norm_out""norm_out""norm_out""norm_out", constant value (in combination with 'weight_filler'"weight_filler""weight_filler""weight_filler""weight_filler""weight_filler" = 'msra'"msra""msra""msra""msra""msra")

Default: 'norm_in'"norm_in""norm_in""norm_in""norm_in""norm_in"

Certain parameters of layers created using this operator create_dl_layer_transposed_convolutioncreate_dl_layer_transposed_convolutionCreateDlLayerTransposedConvolutionCreateDlLayerTransposedConvolutionCreateDlLayerTransposedConvolutioncreate_dl_layer_transposed_convolution 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
'groups'"groups""groups""groups""groups""groups" (GroupsGroupsGroupsGroupsgroupsgroups)
'input_depth'"input_depth""input_depth""input_depth""input_depth""input_depth"
'input_layer'"input_layer""input_layer""input_layer""input_layer""input_layer" (DLLayerInputDLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input)
'kernel_depth'"kernel_depth""kernel_depth""kernel_depth""kernel_depth""kernel_depth" (KernelDepthKernelDepthKernelDepthKernelDepthkernelDepthkernel_depth)
'kernel_size'"kernel_size""kernel_size""kernel_size""kernel_size""kernel_size" (KernelSizeKernelSizeKernelSizeKernelSizekernelSizekernel_size)
'name'"name""name""name""name""name" (LayerNameLayerNameLayerNameLayerNamelayerNamelayer_name)
'output_layer'"output_layer""output_layer""output_layer""output_layer""output_layer" (DLLayerTransposedConvolutionDLLayerTransposedConvolutionDLLayerTransposedConvolutionDLLayerTransposedConvolutionDLLayerTransposedConvolutiondllayer_transposed_convolution)
'padding_type'"padding_type""padding_type""padding_type""padding_type""padding_type" (PaddingPaddingPaddingPaddingpaddingpadding)
'shape'"shape""shape""shape""shape""shape"
'stride'"stride""stride""stride""stride""stride" (StrideStrideStrideStridestridestride)
'type'"type""type""type""type""type"
Generic Layer Parameters set get
'bias_term'"bias_term""bias_term""bias_term""bias_term""bias_term"
'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output""is_inference_output"
'learning_rate_multiplier'"learning_rate_multiplier""learning_rate_multiplier""learning_rate_multiplier""learning_rate_multiplier""learning_rate_multiplier"
'num_trainable_params'"num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params"
'weight_filler'"weight_filler""weight_filler""weight_filler""weight_filler""weight_filler"
'weight_filler_const_val'"weight_filler_const_val""weight_filler_const_val""weight_filler_const_val""weight_filler_const_val""weight_filler_const_val"
'weight_filler_variance_norm'"weight_filler_variance_norm""weight_filler_variance_norm""weight_filler_variance_norm""weight_filler_variance_norm""weight_filler_variance_norm"

Attention

This layer cannot be run by setting 'runtime'"runtime""runtime""runtime""runtime""runtime" to 'cpu'"cpu""cpu""cpu""cpu""cpu" for training. It is only applicable for training with a GPU by setting 'runtime'"runtime""runtime""runtime""runtime""runtime" to 'gpu'"gpu""gpu""gpu""gpu""gpu".

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.

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

Width and height of the filter kernels.

Default value: 3

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

Amount of filter shift.

Default value: 1

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

Depth of filter kernels.

Default value: 64

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

Number of filter groups.

Default value: 1

PaddingPaddingPaddingPaddingpaddingpadding (input_control)  number(-array) HTupleMaybeSequence[Union[str, int]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Type of the padding.

Default value: 'none' "none" "none" "none" "none" "none"

List of values: [all], [width,height], [left,right,top,bottom], 'half_kernel_size'"half_kernel_size""half_kernel_size""half_kernel_size""half_kernel_size""half_kernel_size", 'none'"none""none""none""none""none"

Suggested values: 'none'"none""none""none""none""none", 'half_kernel_size'"half_kernel_size""half_kernel_size""half_kernel_size""half_kernel_size""half_kernel_size"

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

Generic input parameter names.

Default value: []

List of values: 'bias_term'"bias_term""bias_term""bias_term""bias_term""bias_term", 'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output""is_inference_output", 'learning_rate_multiplier'"learning_rate_multiplier""learning_rate_multiplier""learning_rate_multiplier""learning_rate_multiplier""learning_rate_multiplier", 'weight_filler'"weight_filler""weight_filler""weight_filler""weight_filler""weight_filler", 'weight_filler_const_val'"weight_filler_const_val""weight_filler_const_val""weight_filler_const_val""weight_filler_const_val""weight_filler_const_val", 'weight_filler_variance_norm'"weight_filler_variance_norm""weight_filler_variance_norm""weight_filler_variance_norm""weight_filler_variance_norm""weight_filler_variance_norm"

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: 'xavier'"xavier""xavier""xavier""xavier""xavier", 'msra'"msra""msra""msra""msra""msra", 'const'"const""const""const""const""const", 'norm_in'"norm_in""norm_in""norm_in""norm_in""norm_in", 'norm_out'"norm_out""norm_out""norm_out""norm_out""norm_out", 'norm_average'"norm_average""norm_average""norm_average""norm_average""norm_average", 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"

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

Transposed convolutional layer.

Module

Deep Learning Training