pub struct IDeconvolutionLayer { /* private fields */ }Expand description
IDeconvolutionLayer
A deconvolution layer in a network definition.
Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
Implementations§
Source§impl IDeconvolutionLayer
impl IDeconvolutionLayer
Sourcepub fn setNbOutputMaps(self: Pin<&mut IDeconvolutionLayer>, nbOutputMaps: i64)
pub fn setNbOutputMaps(self: Pin<&mut IDeconvolutionLayer>, nbOutputMaps: i64)
Set the number of output feature maps for the deconvolution.
If executing this layer on DLA, the number of output maps must be in the range [1,8192].
See [getNbOutputMaps()]
Sourcepub fn getNbOutputMaps(self: &IDeconvolutionLayer) -> i64
pub fn getNbOutputMaps(self: &IDeconvolutionLayer) -> i64
Get the number of output feature maps for the deconvolution.
See [setNbOutputMaps()]
Sourcepub fn setNbGroups(self: Pin<&mut IDeconvolutionLayer>, nbGroups: i64)
pub fn setNbGroups(self: Pin<&mut IDeconvolutionLayer>, nbGroups: i64)
Set the number of groups for a deconvolution.
The input tensor channels are divided into nbGroups groups, and a deconvolution is executed for each group, using a filter per group. The results of the group convolutions are concatenated to form the output.
If executing this layer on DLA, nbGroups must be one
When using groups in int8 mode, the size of the groups (i.e. the channel count divided by the group count) must be a multiple of 4 for both input and output.
Default: 1
See [getNbGroups()]
Sourcepub fn getNbGroups(self: &IDeconvolutionLayer) -> i64
pub fn getNbGroups(self: &IDeconvolutionLayer) -> i64
Get the number of groups for a deconvolution.
See [setNbGroups()]
Sourcepub fn setKernelWeights(self: Pin<&mut IDeconvolutionLayer>, weights: Weights)
pub fn setKernelWeights(self: Pin<&mut IDeconvolutionLayer>, weights: Weights)
Set the kernel weights for the deconvolution.
The weights are specified as a contiguous array in CKRS order, where C the number of input channels, K the number of output feature maps, and R and S are the height and width of the filter.
See [getWeights()]
Sourcepub fn getKernelWeights(self: &IDeconvolutionLayer) -> Weights
pub fn getKernelWeights(self: &IDeconvolutionLayer) -> Weights
Get the kernel weights for the deconvolution.
See [setNbGroups()]
Sourcepub fn setBiasWeights(self: Pin<&mut IDeconvolutionLayer>, weights: Weights)
pub fn setBiasWeights(self: Pin<&mut IDeconvolutionLayer>, weights: Weights)
Set the bias weights for the deconvolution.
Bias is optional. To omit bias, set the count value of the weights structure to zero.
The bias is applied per-feature-map, so the number of weights (if non-zero) must be equal to the number of output feature maps.
See [getBiasWeights()]
Sourcepub fn getBiasWeights(self: &IDeconvolutionLayer) -> Weights
pub fn getBiasWeights(self: &IDeconvolutionLayer) -> Weights
Get the bias weights for the deconvolution.
See [getBiasWeights()]
Sourcepub fn setPrePadding(self: Pin<&mut IDeconvolutionLayer>, padding: &Dims64)
pub fn setPrePadding(self: Pin<&mut IDeconvolutionLayer>, padding: &Dims64)
Set the multi-dimension pre-padding of the deconvolution.
The output will be trimmed by this number of elements on the start of every dimension. In other words, it resembles the inverse of a convolution layer with this padding size. Negative padding is not supported.
Default: (0, 0, …, 0)
See [getPrePadding()]
Sourcepub fn getPrePadding(self: &IDeconvolutionLayer) -> Dims64
pub fn getPrePadding(self: &IDeconvolutionLayer) -> Dims64
Get the pre-padding.
See [setPrePadding()]
Sourcepub fn setPostPadding(self: Pin<&mut IDeconvolutionLayer>, padding: &Dims64)
pub fn setPostPadding(self: Pin<&mut IDeconvolutionLayer>, padding: &Dims64)
Set the multi-dimension post-padding of the deconvolution.
The output will be trimmed by this number of elements on the end of every dimension. In other words, it resembles the inverse of a convolution layer with this padding size. Negative padding is not supported.
Default: (0, 0, …, 0)
See [getPostPadding()]
Sourcepub fn getPostPadding(self: &IDeconvolutionLayer) -> Dims64
pub fn getPostPadding(self: &IDeconvolutionLayer) -> Dims64
Get the padding.
See [setPostPadding()]
Sourcepub fn setPaddingMode(
self: Pin<&mut IDeconvolutionLayer>,
paddingMode: PaddingMode,
)
pub fn setPaddingMode( self: Pin<&mut IDeconvolutionLayer>, paddingMode: PaddingMode, )
Set the padding mode.
Padding mode takes precedence if both setPaddingMode and setPre/PostPadding are used.
Default: kEXPLICIT_ROUND_DOWN
See [getPaddingMode()]
Sourcepub fn getPaddingMode(self: &IDeconvolutionLayer) -> PaddingMode
pub fn getPaddingMode(self: &IDeconvolutionLayer) -> PaddingMode
Get the padding mode.
Default: kEXPLICIT_ROUND_DOWN
See [setPaddingMode()]
Sourcepub fn setKernelSizeNd(self: Pin<&mut IDeconvolutionLayer>, kernelSize: &Dims64)
pub fn setKernelSizeNd(self: Pin<&mut IDeconvolutionLayer>, kernelSize: &Dims64)
Set the multi-dimension kernel size of the deconvolution.
If executing this layer on DLA, there are two restrictions:
- Only 2D Kernel is supported.
- Kernel height and width must be in the range [1,32] or the combinations of [64, 96, 128] in one dimension and 1 in the other dimensions, i.e. [1x64] or [64x1] are valid, but not [64x64].
See [getKernelSizeNd()]
Sourcepub fn getKernelSizeNd(self: &IDeconvolutionLayer) -> Dims64
pub fn getKernelSizeNd(self: &IDeconvolutionLayer) -> Dims64
Get the multi-dimension kernel size of the deconvolution.
See [setKernelSizeNd()]
Sourcepub fn setStrideNd(self: Pin<&mut IDeconvolutionLayer>, stride: &Dims64)
pub fn setStrideNd(self: Pin<&mut IDeconvolutionLayer>, stride: &Dims64)
Set the multi-dimension stride of the deconvolution.
Default: (1, 1, …, 1)
If executing this layer on DLA, there are two restrictions:
- Only 2D Stride is supported.
- Stride height and width must be in the range [1,32] or the combinations of [64, 96, 128] in one dimension and 1 in the other dimensions, i.e. [1x64] or [64x1] are valid, but not [64x64].
See [getStrideNd()]
Sourcepub fn getStrideNd(self: &IDeconvolutionLayer) -> Dims64
pub fn getStrideNd(self: &IDeconvolutionLayer) -> Dims64
Get the multi-dimension stride of the deconvolution.
See [setStrideNd()]
Sourcepub fn setPaddingNd(self: Pin<&mut IDeconvolutionLayer>, padding: &Dims64)
pub fn setPaddingNd(self: Pin<&mut IDeconvolutionLayer>, padding: &Dims64)
Set the multi-dimension padding of the deconvolution.
The output will be trimmed by this number of elements on both sides of every dimension. In other words, it resembles the inverse of a convolution layer with this padding size. Padding is symmetric, and negative padding is not supported.
Default: (0, 0, …, 0)
If executing this layer on DLA, padding must be 0.
See [getPaddingNd()] setPadding() getPadding()
Sourcepub fn getPaddingNd(self: &IDeconvolutionLayer) -> Dims64
pub fn getPaddingNd(self: &IDeconvolutionLayer) -> Dims64
Get the multi-dimension padding of the deconvolution.
If the padding is asymmetric, the pre-padding is returned.
See [setPaddingNd()]
Sourcepub fn setDilationNd(self: Pin<&mut IDeconvolutionLayer>, dilation: &Dims64)
pub fn setDilationNd(self: Pin<&mut IDeconvolutionLayer>, dilation: &Dims64)
Set the multi-dimension dilation of the deconvolution.
Default: (1, 1, …, 1)
See [getDilationNd()]
Sourcepub fn getDilationNd(self: &IDeconvolutionLayer) -> Dims64
pub fn getDilationNd(self: &IDeconvolutionLayer) -> Dims64
Get the multi-dimension dilation of the deconvolution.
See [setDilationNd()]