pub enum ConvMode<const N: usize> {
Full,
Same,
Valid,
Custom {
padding: [usize; N],
strides: [usize; N],
},
Explicit {
padding: [[usize; 2]; N],
strides: [usize; N],
},
}
Expand description
Specifies the convolution mode, which determines the output size.
Variants§
Full
The output has the largest size, including all positions where the kernel and input overlap at least partially.
Same
The output has the same size as the input.
Valid
The output has the smallest size, including only positions where the kernel and input fully overlap.
Custom
Specifies custom padding and strides.
Fields
Explicit
Specifies explicit padding and strides.
Trait Implementations§
impl<const N: usize> Copy for ConvMode<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for ConvMode<N>
impl<const N: usize> RefUnwindSafe for ConvMode<N>
impl<const N: usize> Send for ConvMode<N>
impl<const N: usize> Sync for ConvMode<N>
impl<const N: usize> Unpin for ConvMode<N>
impl<const N: usize> UnwindSafe for ConvMode<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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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