This class implements a layer that performs transposed convolution (sometimes also called deconvolution or up-convolution) on a set of two-dimensional multi-channel images. Padding and dilated convolution are supported.
void SetFilterHeight( int filterHeight );
void SetFilterWidth( int filterWidth );
void SetFilterCount( int filterCount );
Sets the filters' size and number.
void SetStrideHeight( int strideHeight );
void SetStrideWidth( int strideWidth );
Sets the convolution stride. By default, the stride is 1
.
void SetPaddingHeight( int paddingHeight );
void SetPaddingWidth( int paddingWidth );
Sets the width and height of padding that should be removed from the convolution result. For example, if SetPaddingWidth( 1 );
, two columns - one on the right and one on the left - will be cut off of the resulting image. By default these values are set to 0
.
void SetDilationHeight( int dilationHeight );
void SetDilationWidth( int dilationWidth );
Sets the vertical and horizontal step values for dilated convolution. Dilated convolution applies the filter not to the consecutive pixels of the original image but to pixels with the gaps between.
By default, these values are equal to 1
: no dilation, consecutive pixels are used.
void SetZeroFreeTerm(bool isZeroFreeTerm);
Specifies if the free terms should be used. If you set this value to true
, the free terms vector will be set to all zeros and won't be trained. By default, this value is set to false
.
CPtr<CDnnBlob> GetFilterData() const;
The filters are represented by a blob of the following dimensions:
BatchLength
is equal to1
BatchWidth
is equal to the inputs'Channels * Depth
ListSize
is equal to1
Height
is equal toGetFilterHeight()
Width
is equal toGetFilterWidth()
Depth
is equal to1
Channels
is equal toGetFilterCount()
CPtr<CDnnBlob> GetFreeTermData() const;
The free terms are represented by a blob of the total size equal to the number of filters used (GetFilterCount()
).
Each input accepts a blob with several images. The dimensions of all inputs should be the same:
BatchLength * BatchWidth * ListSize
- the number of images in the set.Height
- the images' height.Width
- the images' width.Depth * Channels
- the number of channels the image format uses.
For each input the layer has one output. It contains a blob with the result of convolution. The output blob dimensions are:
BatchLength
is equal to the inputBatchLength
.BatchWidth
is equal to the inputBatchWidth
.ListSize
is equal to the inputListSize
.Height
can be calculated from the inputHeight
asStrideHeight * (Height - 1) + (FilterHeight - 1) * DilationHeight + 1 - 2 * PaddingHeight
.Width
can be calculated from the inputWidth
asStrideWidth * (Width - 1) + (FilterWidth - 1) * DilationWidth + 1 - 2 * PaddingWidth
.Depth
is equal to1
.Channels
is equal toGetFilterCount()
.