pub struct PaddedConvOptions<const N: usize> {
pub options: ConvOptions<N>,
pub padding_end: Option<[usize; N]>,
}Expand description
Convolution options with support for asymmetric padding.
Wraps ConvOptions (which represents symmetric padding for the backend op)
and adds optional asymmetric padding. When asymmetric padding is specified,
the functional convolution layer applies an explicit pad operation before
dispatching to the backend.
Implements From<ConvOptions<N>> for backward compatibility.
Fields§
§options: ConvOptions<N>The underlying convolution options for the backend.
padding_end: Option<[usize; N]>Padding at the end of each dimension (e.g., bottom/right for 2D).
If None, padding is symmetric (same as options.padding).
If Some, specifies different end-padding per dimension.
Implementations§
Source§impl<const N: usize> PaddedConvOptions<N>
impl<const N: usize> PaddedConvOptions<N>
Sourcepub fn asymmetric(
stride: [usize; N],
padding_start: [usize; N],
padding_end: [usize; N],
dilation: [usize; N],
groups: usize,
) -> PaddedConvOptions<N>
pub fn asymmetric( stride: [usize; N], padding_start: [usize; N], padding_end: [usize; N], dilation: [usize; N], groups: usize, ) -> PaddedConvOptions<N>
Creates options with asymmetric padding.
padding_start is stored in ConvOptions::padding.
padding_end specifies the end padding per dimension.
Sourcepub fn is_asymmetric(&self) -> bool
pub fn is_asymmetric(&self) -> bool
Returns true if padding is asymmetric.
Trait Implementations§
Source§impl<const N: usize> Clone for PaddedConvOptions<N>
impl<const N: usize> Clone for PaddedConvOptions<N>
Source§fn clone(&self) -> PaddedConvOptions<N>
fn clone(&self) -> PaddedConvOptions<N>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<const N: usize> Debug for PaddedConvOptions<N>
impl<const N: usize> Debug for PaddedConvOptions<N>
Source§impl<const N: usize> From<ConvOptions<N>> for PaddedConvOptions<N>
impl<const N: usize> From<ConvOptions<N>> for PaddedConvOptions<N>
Source§fn from(options: ConvOptions<N>) -> PaddedConvOptions<N>
fn from(options: ConvOptions<N>) -> PaddedConvOptions<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for PaddedConvOptions<N>
impl<const N: usize> RefUnwindSafe for PaddedConvOptions<N>
impl<const N: usize> Send for PaddedConvOptions<N>
impl<const N: usize> Sync for PaddedConvOptions<N>
impl<const N: usize> Unpin for PaddedConvOptions<N>
impl<const N: usize> UnsafeUnpin for PaddedConvOptions<N>
impl<const N: usize> UnwindSafe for PaddedConvOptions<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more