Struct PaddedConvOptions
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§
§impl<const N: usize> PaddedConvOptions<N>
impl<const N: usize> PaddedConvOptions<N>
pub 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.
pub fn is_asymmetric(&self) -> bool
pub fn is_asymmetric(&self) -> bool
Returns true if padding is asymmetric.
Trait Implementations§
§impl<const N: usize> Clone for PaddedConvOptions<N>
impl<const N: usize> Clone for PaddedConvOptions<N>
§fn clone(&self) -> PaddedConvOptions<N>
fn clone(&self) -> PaddedConvOptions<N>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<const N: usize> Debug for PaddedConvOptions<N>
impl<const N: usize> Debug for PaddedConvOptions<N>
§impl<const N: usize> From<ConvOptions<N>> for PaddedConvOptions<N>
impl<const N: usize> From<ConvOptions<N>> for PaddedConvOptions<N>
§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> 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<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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