Struct concision_linear::prelude::Linear
source · pub struct Linear<T = f64, D = Ix2>where
D: RemoveAxis,{ /* private fields */ }Expand description
Linear model
Implementations§
source§impl<T, D> Linear<T, D>where
D: RemoveAxis,
impl<T, D> Linear<T, D>where
D: RemoveAxis,
pub fn with_params<D2>(self, params: LinearParams<T, D2>) -> Linear<T, D2>where
D2: RemoveAxis,
pub fn config(&self) -> &Config
pub fn bias(&self) -> Option<&Array<T, D::Smaller>>
pub fn bias_mut(&mut self) -> Option<&mut Array<T, D::Smaller>>
pub fn weights(&self) -> &Array<T, D>
pub fn weights_mut(&mut self) -> &mut Array<T, D>
pub fn params(&self) -> &LinearParams<T, D>
pub fn params_mut(&mut self) -> &mut LinearParams<T, D>
pub fn is_biased(&self) -> bool
pub fn activate<X, Y, F>(&self, args: &X, func: F) -> Result<Y>
Trait Implementations§
source§impl<T, D> Borrow<LinearParamsBase<OwnedRepr<T>, D>> for Linear<T, D>where
D: RemoveAxis,
impl<T, D> Borrow<LinearParamsBase<OwnedRepr<T>, D>> for Linear<T, D>where
D: RemoveAxis,
source§fn borrow(&self) -> &LinearParams<T, D>
fn borrow(&self) -> &LinearParams<T, D>
Immutably borrows from an owned value. Read more
source§impl<T, D> BorrowMut<LinearParamsBase<OwnedRepr<T>, D>> for Linear<T, D>where
D: RemoveAxis,
impl<T, D> BorrowMut<LinearParamsBase<OwnedRepr<T>, D>> for Linear<T, D>where
D: RemoveAxis,
source§fn borrow_mut(&mut self) -> &mut LinearParams<T, D>
fn borrow_mut(&mut self) -> &mut LinearParams<T, D>
Mutably borrows from an owned value. Read more
source§impl<T, D> Module for Linear<T, D>where
D: RemoveAxis,
impl<T, D> Module for Linear<T, D>where
D: RemoveAxis,
Auto Trait Implementations§
impl<T, D> Freeze for Linear<T, D>
impl<T, D> RefUnwindSafe for Linear<T, D>
impl<T, D> Send for Linear<T, D>where
T: Send,
impl<T, D> Sync for Linear<T, D>where
T: Sync,
impl<T, D> Unpin for Linear<T, D>
impl<T, D> UnwindSafe for Linear<T, D>
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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