Skip to main content

IDeconvolutionLayer

Struct IDeconvolutionLayer 

Source
pub struct IDeconvolutionLayer { /* private fields */ }
Expand description

! ! \class IDeconvolutionLayer ! ! \brief A deconvolution layer in a network definition. ! ! \warning Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI. !

Implementations§

Source§

impl IDeconvolutionLayer

Source

pub fn setNbOutputMaps(self: Pin<&mut IDeconvolutionLayer>, nbOutputMaps: i64)

! ! \brief 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() !

Source

pub fn getNbOutputMaps(self: &IDeconvolutionLayer) -> i64

! ! \brief Get the number of output feature maps for the deconvolution. ! ! \see setNbOutputMaps() !

Source

pub fn setNbGroups(self: Pin<&mut IDeconvolutionLayer>, nbGroups: i64)

! ! \brief Set the number of groups for a deconvolution. ! ! The input tensor channels are divided into \p 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 ! ! \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 ! ! \see getNbGroups() !

Source

pub fn getNbGroups(self: &IDeconvolutionLayer) -> i64

! ! \brief Get the number of groups for a deconvolution. ! ! \see setNbGroups() !

Source

pub fn setKernelWeights(self: Pin<&mut IDeconvolutionLayer>, weights: Weights)

! ! \brief Set the kernel weights for the deconvolution. ! ! The weights are specified as a contiguous array in \p CKRS order, where \p C the number of ! input channels, \p K the number of output feature maps, and \p R and \p S are the height and width ! of the filter. ! ! \see getWeights() !

Source

pub fn getKernelWeights(self: &IDeconvolutionLayer) -> Weights

! ! \brief Get the kernel weights for the deconvolution. ! ! \see setNbGroups() !

Source

pub fn setBiasWeights(self: Pin<&mut IDeconvolutionLayer>, weights: Weights)

! ! \brief 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() !

Source

pub fn getBiasWeights(self: &IDeconvolutionLayer) -> Weights

! ! \brief Get the bias weights for the deconvolution. ! ! \see getBiasWeights() !

Source

pub fn setPrePadding(self: Pin<&mut IDeconvolutionLayer>, padding: &Dims64)

! ! \brief 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() !

Source

pub fn getPrePadding(self: &IDeconvolutionLayer) -> Dims64

! ! \brief Get the pre-padding. ! ! \see setPrePadding() !

Source

pub fn setPostPadding(self: Pin<&mut IDeconvolutionLayer>, padding: &Dims64)

! ! \brief 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() !

Source

pub fn getPostPadding(self: &IDeconvolutionLayer) -> Dims64

! ! \brief Get the padding. ! ! \see setPostPadding() !

Source

pub fn setPaddingMode( self: Pin<&mut IDeconvolutionLayer>, 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() !

Source

pub fn getPaddingMode(self: &IDeconvolutionLayer) -> PaddingMode

! ! \brief Get the padding mode. ! ! Default: kEXPLICIT_ROUND_DOWN ! ! \see setPaddingMode() !

Source

pub fn setKernelSizeNd(self: Pin<&mut IDeconvolutionLayer>, kernelSize: &Dims64)

! ! \brief Set the multi-dimension kernel size of the deconvolution. ! ! If executing this layer on DLA, there are two restrictions: ! 1) Only 2D Kernel is supported. ! 2) 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() !

Source

pub fn getKernelSizeNd(self: &IDeconvolutionLayer) -> Dims64

! ! \brief Get the multi-dimension kernel size of the deconvolution. ! ! \see setKernelSizeNd() !

Source

pub fn setStrideNd(self: Pin<&mut IDeconvolutionLayer>, stride: &Dims64)

! ! \brief Set the multi-dimension stride of the deconvolution. ! ! Default: (1, 1, …, 1) ! ! If executing this layer on DLA, there are two restrictions: ! 1) Only 2D Stride is supported. ! 2) 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() !

Source

pub fn getStrideNd(self: &IDeconvolutionLayer) -> Dims64

! ! \brief Get the multi-dimension stride of the deconvolution. ! ! \see setStrideNd() !

Source

pub fn setPaddingNd(self: Pin<&mut IDeconvolutionLayer>, padding: &Dims64)

! ! \brief 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() !

Source

pub fn getPaddingNd(self: &IDeconvolutionLayer) -> Dims64

! ! \brief Get the multi-dimension padding of the deconvolution. ! ! If the padding is asymmetric, the pre-padding is returned. ! ! \see setPaddingNd() !

Source

pub fn setDilationNd(self: Pin<&mut IDeconvolutionLayer>, dilation: &Dims64)

! ! \brief Set the multi-dimension dilation of the deconvolution. ! ! Default: (1, 1, …, 1) ! ! \see getDilationNd() !

Source

pub fn getDilationNd(self: &IDeconvolutionLayer) -> Dims64

! ! \brief Get the multi-dimension dilation of the deconvolution. ! ! \see setDilationNd() !

Trait Implementations§

Source§

impl AsRef<ILayer> for IDeconvolutionLayer

Source§

fn as_ref(self: &IDeconvolutionLayer) -> &ILayer

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl ExternType for IDeconvolutionLayer

Source§

type Id = (n, v, i, n, f, e, r, _1, (), I, D, e, c, o, n, v, o, l, u, t, i, o, n, L, a, y, e, r)

A type-level representation of the type’s C++ namespace and type name. Read more
Source§

type Kind = Opaque

Source§

impl MakeCppStorage for IDeconvolutionLayer

Source§

unsafe fn allocate_uninitialized_cpp_storage() -> *mut IDeconvolutionLayer

Allocates heap space for this type in C++ and return a pointer to that space, but do not initialize that space (i.e. do not yet call a constructor). Read more
Source§

unsafe fn free_uninitialized_cpp_storage(arg0: *mut IDeconvolutionLayer)

Frees a C++ allocation which has not yet had a constructor called. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.