pub struct IPaddingLayer { /* private fields */ }Expand description
IPaddingLayer
Layer that represents a padding operation.
The padding layer adds zero-padding at the start and end of the input tensor. It supports padding only the last two dimensions. Applying negative padding results in cropping of the input.
To pad across any subset of dimensions, use ISliceLayer with SampleMode::kFILL.
Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
Implementations§
Source§impl IPaddingLayer
impl IPaddingLayer
Sourcepub fn setPrePaddingNd(self: Pin<&mut IPaddingLayer>, padding: &Dims64)
pub fn setPrePaddingNd(self: Pin<&mut IPaddingLayer>, padding: &Dims64)
Set the padding that is applied at the start of the tensor.
Negative padding results in trimming the edge by the specified amount.
Only 2 dimensional padding is currently supported.
See [getPrePaddingNd]
Sourcepub fn getPrePaddingNd(self: &IPaddingLayer) -> Dims64
pub fn getPrePaddingNd(self: &IPaddingLayer) -> Dims64
Get the padding that is applied at the start of the tensor.
Only 2 dimensional padding is currently supported.
See [setPrePaddingNd]
Sourcepub fn setPostPaddingNd(self: Pin<&mut IPaddingLayer>, padding: &Dims64)
pub fn setPostPaddingNd(self: Pin<&mut IPaddingLayer>, padding: &Dims64)
Set the padding that is applied at the end of the tensor.
Negative padding results in trimming the edge by the specified amount
Only 2 dimensional padding is currently supported.
See [getPostPaddingNd]
Sourcepub fn getPostPaddingNd(self: &IPaddingLayer) -> Dims64
pub fn getPostPaddingNd(self: &IPaddingLayer) -> Dims64
Get the padding that is applied at the end of the tensor.
Only 2 dimensional padding is currently supported.
See [setPostPaddingNd]