dlpy.layers.Conv2DTranspose¶
-
class
dlpy.layers.
Conv2DTranspose
(n_filters, height=None, width=None, output_size=None, name=None, act='AUTO', dropout=0, fcmp_act=None, include_bias=True, init='XAVIER', init_bias=0, mean=0, std=1, output_padding=None, output_padding_height=None, output_padding_width=None, padding=None, padding_height=None, padding_width=None, stride=None, stride_horizontal=None, stride_vertical=None, truncation_factor=None, src_layers=None, **kwargs)¶ Transpose Convolution layer in 2D
- Parameters
- n_filtersint
Specifies the number of filters for the layer.
- widthint
Specifies the width of the kernel.
- heightint
Specifies the height of the kernel.
- output_sizetuple
Specifies the shape of output. 3D tensor with shape: (n_filters, new_rows, new_cols)
- strideint, optional
Specifies the step size for the moving window of the kernel over the input data.
- namestring, optional
Specifies the name of the convolution layer.
- stride_horizontalint, optional
Specifies the horizontal stride.
- stride_verticalint, optional
Specifies the vertical stride.
- paddingint, optional
Specifies the padding size, assuming equal padding vertically and horizontally.
- padding_widthint, optional
Specifies the length of the horizontal padding.
- padding_heightint, optional
Specifies the length of the vertical padding.
- actstring, optional
Specifies the activation function. Valid Values: AUTO, IDENTITY, LOGISTIC, SIGMOID, TANH, RECTIFIER, RELU, SOFPLUS, ELU, LEAKY, FCMP Default: AUTO
- fcmp_actstring, optional
Specifies the FCMP activation function for the layer.
- initstring, optional
Specifies the initialization scheme for the layer. Valid Values: XAVIER, UNIFORM, NORMAL, CAUCHY, XAVIER1, XAVIER2, MSRA, MSRA1, MSRA2 Default: XAVIER
- meanfloat, optional
Specifies the mean value when the
init
parameter is set to NORMAL.- stdfloat, optional
Specifies the standard deviation value when the
init
parameter is set to NORMAL.- output_paddingint
Specifies the number of pixels to add to the right and bottom sides of the input to adjust the output shape. This parameter is used to resolve ambiguity that might be introduced when stride is larger than 1. If the input shape is 32x32, kernel size is 3x3, and stride is 2 on both sides, and padding is 1 on both sides, then the output shape is 63x63. Setting the output_paddings to 1 on both sides changes the output shape to 64x64.
- output_padding_heightint
Specifies the number of pixels to be added to the bottom side of the input to adjust the output shape. This parameter is used to resolve ambiguity that might be introduced when the stride is larger than 1. If the input shape is 32x32, kernel size is 3x3, stride is 2 on both sides, and padding is 1 on both sides, then the output shape is 63x63. Setting output_paddings to 1 on both sides changes the output shape to 64x64.
- output_padding_widthint
specifies the number of pixels to add to the right side of the input to adjust the output shape. This parameter is used to resolve ambiguity that might be introduced when stride is larger than 1. If the input shape is 32x32, kernel size is 3x3, stride is 2 on both sides, and padding is 1 on both sides, then the output shape is 63x63. Setting the outputPaddings to 1 on both sides changes the output shape to 64x64.
- truncation_factorfloat, optional
Specifies the truncation threshold (truncationFactor x std), when the
init
parameter is set to NORMAL- init_biasfloat, optional
Specifies the initial bias for the layer.
- dropoutfloat, optional
Specifies the dropout rate. Default: 0
- include_biasbool, optional
Includes bias neurons (default).
- src_layersiter-of-Layers, optional
Specifies the layers directed to this layer.
- Returns
-
__init__
(n_filters, height=None, width=None, output_size=None, name=None, act='AUTO', dropout=0, fcmp_act=None, include_bias=True, init='XAVIER', init_bias=0, mean=0, std=1, output_padding=None, output_padding_height=None, output_padding_width=None, padding=None, padding_height=None, padding_width=None, stride=None, stride_horizontal=None, stride_vertical=None, truncation_factor=None, src_layers=None, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(n_filters[, height, width, …])Initialize self.
calculate_output_padding
()calculate output_padding before adding the layer
count_instances
()format_name
([block_num, local_count])Format the name of the layer
get_number_of_instances
()to_model_params
()Convert the model configuration to CAS action parameters
Attributes
can_be_last_layer
kernel_size
layer_id
num_bias
num_weights
number_of_instances
output_size
rnn_summary
Return a DataFrame containing the layer information for rnn models
summary
Return a DataFrame containing the layer information
type
type_desc
type_label