pub struct Conv2DLayer {
pub in_channels: usize,
pub out_channels: usize,
pub kernel_size: usize,
pub stride: usize,
pub padding: usize,
pub kernels: Vec<f64>,
}Expand description
Stochastic 2D convolutional layer.
Kernels stored as probabilities in [0,1]. Forward pass uses P(A∧B) = P(A)·P(B) for unipolar stochastic multiplication.
Fields§
§in_channels: usize§out_channels: usize§kernel_size: usize§stride: usize§padding: usize§kernels: Vec<f64>Flat kernels: [out_ch, in_ch, k, k]
Implementations§
Trait Implementations§
Source§impl Clone for Conv2DLayer
impl Clone for Conv2DLayer
Source§fn clone(&self) -> Conv2DLayer
fn clone(&self) -> Conv2DLayer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Conv2DLayer
impl RefUnwindSafe for Conv2DLayer
impl Send for Conv2DLayer
impl Sync for Conv2DLayer
impl Unpin for Conv2DLayer
impl UnsafeUnpin for Conv2DLayer
impl UnwindSafe for Conv2DLayer
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