pub trait ConvExt<'a, T, S, SK, const N: usize>{
// Required method
fn conv(
&self,
kernel: impl IntoKernelWithDilation<'a, SK, N>,
conv_mode: ConvMode<N>,
padding_mode: PaddingMode<N, T>,
) -> Result<Array<T, Dim<[Ix; N]>>, Error<N>>;
}Expand description
Extends ndarray’s ArrayBase with convolution operations.
This trait adds the conv method to ArrayBase, enabling
standard convolution operations on N-dimensional arrays.
§Type Parameters
T: The numeric type of the array elements.S: The data storage type of the input array.SK: The data storage type of the kernel array.
Required Methods§
Sourcefn conv(
&self,
kernel: impl IntoKernelWithDilation<'a, SK, N>,
conv_mode: ConvMode<N>,
padding_mode: PaddingMode<N, T>,
) -> Result<Array<T, Dim<[Ix; N]>>, Error<N>>
fn conv( &self, kernel: impl IntoKernelWithDilation<'a, SK, N>, conv_mode: ConvMode<N>, padding_mode: PaddingMode<N, T>, ) -> Result<Array<T, Dim<[Ix; N]>>, Error<N>>
Performs a standard convolution operation.
This method convolves the input array with a given kernel, using the specified convolution mode and padding.
§Arguments
kernel: The convolution kernel.conv_mode: The convolution mode (Full,Same,Valid,Custom,Explicit).padding_mode: The padding mode (Zeros,Const,Reflect,Replicate,Circular,Custom,Explicit).
§Returns
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.