pub struct IConvolutionLayer { /* private fields */ }Expand description
! ! \class IConvolutionLayer ! ! \brief A convolution layer in a network definition. ! ! This layer performs a correlation operation between 3 or 4 dimensional filter with a 4 or 5 dimensional tensor to ! produce another 4 or 5 dimensional tensor. ! ! An optional bias argument is supported, which adds a per-channel constant to each value in the output. ! ! \warning Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI. !
Implementations§
Source§impl IConvolutionLayer
impl IConvolutionLayer
Sourcepub fn setNbOutputMaps(self: Pin<&mut IConvolutionLayer>, nbOutputMaps: i64)
pub fn setNbOutputMaps(self: Pin<&mut IConvolutionLayer>, nbOutputMaps: i64)
! ! \brief Set the number of output maps for the convolution. ! ! If executing this layer on DLA, the number of output maps must be in the range [1,8192]. ! ! \see getNbOutputMaps() !
Sourcepub fn getNbOutputMaps(self: &IConvolutionLayer) -> i64
pub fn getNbOutputMaps(self: &IConvolutionLayer) -> i64
! ! \brief Get the number of output maps for the convolution. ! ! \see setNbOutputMaps() !
Sourcepub fn setNbGroups(self: Pin<&mut IConvolutionLayer>, nbGroups: i64)
pub fn setNbGroups(self: Pin<&mut IConvolutionLayer>, nbGroups: i64)
! ! \brief Set the number of groups for a convolution. ! ! The input tensor channels are divided into \p nbGroups groups, and a convolution is executed for each group, ! using a filter per group. The results of the group convolutions are concatenated to form the output. ! ! \note 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 ! ! If executing this layer on DLA, the max number of groups is 8192. ! ! \see getNbGroups() !
Sourcepub fn getNbGroups(self: &IConvolutionLayer) -> i64
pub fn getNbGroups(self: &IConvolutionLayer) -> i64
! ! \brief Get the number of groups of the convolution. ! ! \see setNbGroups() !
Sourcepub fn setKernelWeights(self: Pin<&mut IConvolutionLayer>, weights: Weights)
pub fn setKernelWeights(self: Pin<&mut IConvolutionLayer>, weights: Weights)
! ! \brief Set the kernel weights for the convolution. ! ! The weights are specified as a contiguous array in \p GKCRS order, where \p G is the number of groups, \p K ! the number of output feature maps, \p C the number of input channels, and \p R and \p S are the height and ! width of the filter. ! ! \see getKernelWeights() !
Sourcepub fn getKernelWeights(self: &IConvolutionLayer) -> Weights
pub fn getKernelWeights(self: &IConvolutionLayer) -> Weights
! ! \brief Get the kernel weights of the convolution. ! ! \see setKernelWeights() !
Sourcepub fn setBiasWeights(self: Pin<&mut IConvolutionLayer>, weights: Weights)
pub fn setBiasWeights(self: Pin<&mut IConvolutionLayer>, weights: Weights)
! ! \brief Set the bias weights for the convolution. ! ! Bias is optional. To omit bias, set the count value of the weights structure to zero. ! ! The bias is applied per-channel, so the number of weights (if non-zero) must be equal to the number of output ! feature maps. ! ! \see getBiasWeights() !
Sourcepub fn getBiasWeights(self: &IConvolutionLayer) -> Weights
pub fn getBiasWeights(self: &IConvolutionLayer) -> Weights
! ! \brief Get the bias weights for the convolution. ! ! \see setBiasWeights() !
Sourcepub fn setPrePadding(self: Pin<&mut IConvolutionLayer>, padding: &Dims64)
pub fn setPrePadding(self: Pin<&mut IConvolutionLayer>, padding: &Dims64)
! ! \brief Set the multi-dimension pre-padding of the convolution. ! ! The start of the input will be zero-padded by this number of elements in each dimension. ! ! Default: (0, 0, …, 0) ! ! If executing this layer on DLA, only support 2D padding, both height and width of padding must be in the range ! [0,31], and the padding must be less than the kernel size. ! ! \see getPrePadding() !
Sourcepub fn getPrePadding(self: &IConvolutionLayer) -> Dims64
pub fn getPrePadding(self: &IConvolutionLayer) -> Dims64
! ! \brief Get the pre-padding. ! ! \see setPrePadding() !
Sourcepub fn setPostPadding(self: Pin<&mut IConvolutionLayer>, padding: &Dims64)
pub fn setPostPadding(self: Pin<&mut IConvolutionLayer>, padding: &Dims64)
! ! \brief Set the multi-dimension post-padding of the convolution. ! ! The end of the input will be zero-padded by this number of elements in each dimension. ! ! Default: (0, 0, …, 0) ! ! If executing this layer on DLA, only support 2D padding, both height and width of padding must be in the range ! [0,31], and the padding must be less than the kernel size. ! ! \see getPostPadding() !
Sourcepub fn getPostPadding(self: &IConvolutionLayer) -> Dims64
pub fn getPostPadding(self: &IConvolutionLayer) -> Dims64
! ! \brief Get the post-padding. ! ! \see setPostPadding() !
Sourcepub fn setPaddingMode(
self: Pin<&mut IConvolutionLayer>,
paddingMode: PaddingMode,
)
pub fn setPaddingMode( self: Pin<&mut IConvolutionLayer>, paddingMode: PaddingMode, )
! ! \brief 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: &IConvolutionLayer) -> PaddingMode
pub fn getPaddingMode(self: &IConvolutionLayer) -> PaddingMode
! ! \brief Get the padding mode. ! ! Default: kEXPLICIT_ROUND_DOWN ! ! \see setPaddingMode() !
Sourcepub fn setKernelSizeNd(self: Pin<&mut IConvolutionLayer>, kernelSize: &Dims64)
pub fn setKernelSizeNd(self: Pin<&mut IConvolutionLayer>, kernelSize: &Dims64)
! ! \brief Set the multi-dimension kernel size of the convolution. ! ! If executing this layer on DLA, only support 2D kernel size, both height and width of kernel size must be in the ! range [1,32]. ! ! \see getKernelSizeNd() !
Sourcepub fn getKernelSizeNd(self: &IConvolutionLayer) -> Dims64
pub fn getKernelSizeNd(self: &IConvolutionLayer) -> Dims64
! ! \brief Get the multi-dimension kernel size of the convolution. ! ! \see setKernelSizeNd() !
Sourcepub fn setStrideNd(self: Pin<&mut IConvolutionLayer>, stride: &Dims64)
pub fn setStrideNd(self: Pin<&mut IConvolutionLayer>, stride: &Dims64)
! ! \brief Set the multi-dimension stride of the convolution. ! ! Default: (1, 1, …, 1) ! ! If executing this layer on DLA, only support 2D stride, both height and width of stride must be in the range ! [1,8]. ! ! \see getStrideNd() !
Sourcepub fn getStrideNd(self: &IConvolutionLayer) -> Dims64
pub fn getStrideNd(self: &IConvolutionLayer) -> Dims64
! ! \brief Get the multi-dimension stride of the convolution. ! ! \see setStrideNd() !
Sourcepub fn setPaddingNd(self: Pin<&mut IConvolutionLayer>, padding: &Dims64)
pub fn setPaddingNd(self: Pin<&mut IConvolutionLayer>, padding: &Dims64)
! ! \brief Set the multi-dimension padding of the convolution. ! ! The input will be zero-padded by this number of elements in each dimension. ! Padding is symmetric. ! ! Default: (0, 0, …, 0) ! ! If executing this layer on DLA, only support 2D padding, both height and width of padding must be in the range ! [0,31], and the padding must be less than the kernel size. ! ! \see getPaddingNd() setPadding() getPadding() !
Sourcepub fn getPaddingNd(self: &IConvolutionLayer) -> Dims64
pub fn getPaddingNd(self: &IConvolutionLayer) -> Dims64
! ! \brief Get the multi-dimension padding of the convolution. ! ! If the padding is asymmetric, the pre-padding is returned. ! ! \see setPaddingNd() !
Sourcepub fn setDilationNd(self: Pin<&mut IConvolutionLayer>, dilation: &Dims64)
pub fn setDilationNd(self: Pin<&mut IConvolutionLayer>, dilation: &Dims64)
! ! \brief Set the multi-dimension dilation of the convolution. ! ! Default: (1, 1, …, 1) ! ! If executing this layer on DLA, only support 2D padding, both height and width must be in the range [1,32]. ! ! \see getDilationNd() !
Sourcepub fn getDilationNd(self: &IConvolutionLayer) -> Dims64
pub fn getDilationNd(self: &IConvolutionLayer) -> Dims64
! ! \brief Get the multi-dimension dilation of the convolution. ! ! \see setDilationNd() !