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 more