pub struct LinearBuilder<T: Float> { /* private fields */ }Expand description
Test more safe Implementation for Linear
Implementations§
Source§impl<T: Float> LinearBuilder<T>where
Standard: Distribution<T>,
impl<T: Float> LinearBuilder<T>where
Standard: Distribution<T>,
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new linear_builder
by default bias true and initializer as Xavier
pub fn input_size(self, size: usize) -> Self
pub fn output_size(self, size: usize) -> Self
pub fn with_bias(self, bias: bool) -> Self
pub fn with_initializer(self, initializer: Initializer<T>) -> Self
pub fn with_matrix(self, matrix: Matrix<T>) -> Self
pub fn build(self) -> Result<Linear<T>, String>
Auto Trait Implementations§
impl<T> Freeze for LinearBuilder<T>
impl<T> RefUnwindSafe for LinearBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for LinearBuilder<T>
impl<T> Sync for LinearBuilder<T>
impl<T> Unpin for LinearBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for LinearBuilder<T>where
T: UnwindSafe,
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> 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