pub struct Const<const M: usize>;
Expand description
Represents a Dim with size known at compile time
Trait Implementations§
source§impl<const M: usize> PartialEq<Const<M>> for Const<M>
impl<const M: usize> PartialEq<Const<M>> for Const<M>
source§impl<const KERNEL: usize, const STRIDE: usize, const PADDING: usize, const DILATION: usize, Groups: Dim, const DIM: usize> TryConv2D<Const<STRIDE>, Const<PADDING>, Const<DILATION>, Groups> for (Const<DIM>, Const<KERNEL>)where
Const<{ _ }>: Sized,
impl<const KERNEL: usize, const STRIDE: usize, const PADDING: usize, const DILATION: usize, Groups: Dim, const DIM: usize> TryConv2D<Const<STRIDE>, Const<PADDING>, Const<DILATION>, Groups> for (Const<DIM>, Const<KERNEL>)where Const<{ _ }>: Sized,
type Convolved = Const<{ (DIM + 2 * PADDING - DILATION * (KERNEL - 1) - 1) / STRIDE + 1 }>
type Error = Infallible
source§impl<const KERNEL: usize, const STRIDE: usize, const PADDING: usize, const DILATION: usize, Groups: Dim, const DIM: usize> TryConvTrans2D<Const<STRIDE>, Const<PADDING>, Const<DILATION>, Groups> for (Const<DIM>, Const<KERNEL>)where
Const<{ _ }>: Sized,
impl<const KERNEL: usize, const STRIDE: usize, const PADDING: usize, const DILATION: usize, Groups: Dim, const DIM: usize> TryConvTrans2D<Const<STRIDE>, Const<PADDING>, Const<DILATION>, Groups> for (Const<DIM>, Const<KERNEL>)where Const<{ _ }>: Sized,
type Convolved = Const<{ (DIM - 1) * STRIDE - 2 * PADDING + DILATION * (KERNEL - 1) + 1 }>
type Error = Infallible
source§fn try_convtrans2d(
self,
_: Const<STRIDE>,
_: Const<PADDING>,
_: Const<DILATION>,
_: Groups
) -> Result<Self::Convolved, Self::Error>
fn try_convtrans2d( self, _: Const<STRIDE>, _: Const<PADDING>, _: Const<DILATION>, _: Groups ) -> Result<Self::Convolved, Self::Error>
Fallibly applies a 2D convolution to the input tensor.
source§fn convtrans2d(
self,
stride: Stride,
padding: Padding,
dilation: Dilation,
groups: Groups
) -> Self::Convolved
fn convtrans2d( self, stride: Stride, padding: Padding, dilation: Dilation, groups: Groups ) -> Self::Convolved
Applies a 2D convolution to the input tensor.
source§impl<const KERNEL: usize, const STRIDE: usize, const PADDING: usize, const DILATION: usize, const DIM: usize> TryPool2D<Const<KERNEL>, Const<STRIDE>, Const<PADDING>, Const<DILATION>> for Const<DIM>where
Const<{ _ }>: Sized,
impl<const KERNEL: usize, const STRIDE: usize, const PADDING: usize, const DILATION: usize, const DIM: usize> TryPool2D<Const<KERNEL>, Const<STRIDE>, Const<PADDING>, Const<DILATION>> for Const<DIM>where Const<{ _ }>: Sized,
type Pooled = Const<{ (DIM + 2 * PADDING - DILATION * (KERNEL - 1) - 1) / STRIDE + 1 }>
type Error = Infallible
fn try_pool2d( self, _: Pool2DKind, _: Const<KERNEL>, _: Const<STRIDE>, _: Const<PADDING>, _: Const<DILATION> ) -> Result<Self::Pooled, Self::Error>
fn pool2d( self, kind: Pool2DKind, kernel: Kernel, stride: Stride, padding: Padding, dilation: Dilation ) -> Self::Pooled
impl<const M: usize> Copy for Const<M>
impl<const M: usize> Eq for Const<M>
impl<const M: usize> StructuralEq for Const<M>
impl<const M: usize> StructuralPartialEq for Const<M>
Auto Trait Implementations§
impl<const M: usize> RefUnwindSafe for Const<M>
impl<const M: usize> Send for Const<M>
impl<const M: usize> Sync for Const<M>
impl<const M: usize> Unpin for Const<M>
impl<const M: usize> UnwindSafe for Const<M>
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