create_dl_layer_transposed_convolution T_create_dl_layer_transposed_convolution CreateDlLayerTransposedConvolution CreateDlLayerTransposedConvolution create_dl_layer_transposed_convolution (Operator)
Name
create_dl_layer_transposed_convolution T_create_dl_layer_transposed_convolution CreateDlLayerTransposedConvolution CreateDlLayerTransposedConvolution create_dl_layer_transposed_convolution
— Create a transposed convolution layer.
Signature
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_convolution create_dl_layer_transposed_convolution CreateDlLayerTransposedConvolution CreateDlLayerTransposedConvolution CreateDlLayerTransposedConvolution create_dl_layer_transposed_convolution
creates a
transposed convolution layer whose handle is returned in
DLLayerTransposedConvolution DLLayerTransposedConvolution DLLayerTransposedConvolution DLLayerTransposedConvolution DLLayerTransposedConvolution dllayer_transposed_convolution
.
The parameter DLLayerInput DLLayerInput DLLayerInput DLLayerInput DLLayerInput dllayer_input
determines the feeding input layer and
expects the layer handle as value.
The parameter LayerName LayerName LayerName LayerName layerName layer_name
sets an individual layer name.
Note that if creating a model using create_dl_model create_dl_model CreateDlModel CreateDlModel CreateDlModel create_dl_model
each layer of
the created network must have a unique name.
The parameter KernelSize KernelSize KernelSize KernelSize kernelSize kernel_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 Stride Stride Stride Stride stride stride
determines how the filter is shifted in
row
and column
direction.
Restriction: This value must be a tuple of length 1.
The parameter KernelDepth KernelDepth KernelDepth KernelDepth kernelDepth kernel_depth
defines the depth of the output feature
maps.
Restriction: This value must be a tuple of length 1.
The parameter Groups Groups Groups Groups groups groups
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 Padding Padding Padding Padding padding padding
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
KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size
, Stride Stride Stride Stride stride stride
and Padding Padding Padding Padding padding padding
values are
inverses of each other regarding their input and output shapes.
Supported Padding Padding Padding Padding padding padding
values are:
'half_kernel_size' "half_kernel_size" "half_kernel_size" "half_kernel_size" "half_kernel_size" "half_kernel_size" : The integer value of
in the formula above depends on the specified KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size
.
More precisely, it is calculated as
.
'none' "none" "none" "none" "none" "none" : The value of
in the formula above is 0.
Number of pixels: Specify the integer value of
in the formula above for each border.
To do so, the following tuple lengths are supported:
Single number:
value for all
four directions left/right/top/bottom.
Two numbers:
value for left/right
and top/bottom: [l/r, t/b]
.
Four numbers:
value for left,
right, top, bottom side: [l,r,t,b]
.
Restriction: 'runtime' "runtime" "runtime" "runtime" "runtime" "runtime" 'gpu' "gpu" "gpu" "gpu" "gpu" "gpu" does
not support asymmetric padding, i.e., the padding values for the
left and right side must be equal, as well as the padding values for
the top and bottom side.
Restriction: The integer padding values must be smaller
than the value set for KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size
.
So far, the transposed convolution layer does not support bias terms.
The following generic parameters GenParamName GenParamName GenParamName GenParamName genParamName gen_param_name
and the corresponding
values GenParamValue GenParamValue GenParamValue GenParamValue genParamValue gen_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_model apply_dl_model ApplyDlModel ApplyDlModel ApplyDlModel apply_dl_model
will include the output of this
layer in the dictionary DLResultBatch DLResultBatch DLResultBatch DLResultBatch DLResultBatch dlresult_batch
even without specifying this
layer in Outputs Outputs Outputs Outputs outputs outputs
('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_convolution create_dl_layer_convolution CreateDlLayerConvolution CreateDlLayerConvolution CreateDlLayerConvolution create_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_convolution create_dl_layer_convolution CreateDlLayerConvolution CreateDlLayerConvolution CreateDlLayerConvolution create_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_convolution create_dl_layer_convolution CreateDlLayerConvolution CreateDlLayerConvolution CreateDlLayerConvolution create_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_convolution create_dl_layer_transposed_convolution CreateDlLayerTransposedConvolution CreateDlLayerTransposedConvolution CreateDlLayerTransposedConvolution create_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_param set_dl_model_layer_param SetDlModelLayerParam SetDlModelLayerParam SetDlModelLayerParam set_dl_model_layer_param
and which ones can be retrieved
using get_dl_model_layer_param get_dl_model_layer_param GetDlModelLayerParam GetDlModelLayerParam GetDlModelLayerParam get_dl_model_layer_param
or get_dl_layer_param get_dl_layer_param GetDlLayerParam GetDlLayerParam GetDlLayerParam get_dl_layer_param
.
Note, the operators set_dl_model_layer_param set_dl_model_layer_param SetDlModelLayerParam SetDlModelLayerParam SetDlModelLayerParam set_dl_model_layer_param
and
get_dl_model_layer_param get_dl_model_layer_param GetDlModelLayerParam GetDlModelLayerParam GetDlModelLayerParam get_dl_model_layer_param
require a model created by
create_dl_model create_dl_model CreateDlModel CreateDlModel CreateDlModel create_dl_model
.
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
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Processed without parallelization.
Parameters
DLLayerInput DLLayerInput DLLayerInput DLLayerInput DLLayerInput dllayer_input
(input_control) dl_layer →
HDlLayer , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Feeding layer.
LayerName LayerName LayerName LayerName layerName layer_name
(input_control) string →
HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Name of the output layer.
KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size
(input_control) number →
HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Width and height of the filter kernels.
Default value: 3
Stride Stride Stride Stride stride stride
(input_control) number →
HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Amount of filter shift.
Default value: 1
KernelDepth KernelDepth KernelDepth KernelDepth kernelDepth kernel_depth
(input_control) number →
HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Depth of filter kernels.
Default value: 64
Groups Groups Groups Groups groups groups
(input_control) number →
HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Number of filter groups.
Default value: 1
Padding Padding Padding Padding padding padding
(input_control) number(-array) →
HTuple MaybeSequence[Union[str, int]] HTuple Htuple (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"
GenParamName GenParamName GenParamName GenParamName genParamName gen_param_name
(input_control) attribute.name(-array) →
HTuple MaybeSequence[str] HTuple Htuple (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"
GenParamValue GenParamValue GenParamValue GenParamValue genParamValue gen_param_value
(input_control) attribute.value(-array) →
HTuple MaybeSequence[Union[int, float, str]] HTuple Htuple (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"
DLLayerTransposedConvolution DLLayerTransposedConvolution DLLayerTransposedConvolution DLLayerTransposedConvolution DLLayerTransposedConvolution dllayer_transposed_convolution
(output_control) dl_layer →
HDlLayer , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Transposed convolutional layer.
Module
Deep Learning Training