Struct concision_linear::params::LinearParamsBase
source · pub struct LinearParamsBase<S, D = Ix2>where
D: RemoveAxis,
S: RawData,{ /* private fields */ }Implementations§
source§impl<A, S, D> LinearParamsBase<S, D>where
D: RemoveAxis,
S: RawData<Elem = A>,
impl<A, S, D> LinearParamsBase<S, D>where
D: RemoveAxis,
S: RawData<Elem = A>,
pub fn default<Sh>(biased: bool, shape: Sh) -> LinearParamsBase<S, D>
pub fn ones<Sh>(biased: bool, shape: Sh) -> LinearParamsBase<S, D>
pub fn zeros<Sh>(biased: bool, shape: Sh) -> LinearParamsBase<S, D>
pub fn new<Sh>(shape: Sh) -> Self
pub fn biased<F>(self, builder: F) -> Self
pub fn unbiased(self) -> Self
pub fn bias(&self) -> Option<&ArrayBase<S, D::Smaller>>
pub fn bias_mut(&mut self) -> Option<&mut ArrayBase<S, D::Smaller>>
pub fn weights(&self) -> &ArrayBase<S, D>
pub fn weights_mut(&mut self) -> &mut ArrayBase<S, D>
pub fn features(&self) -> Features
pub fn inputs(&self) -> usize
pub fn is_biased(&self) -> bool
pub fn linear<T, B>(&self, data: &T) -> B
pub fn ndim(&self) -> usize
pub fn outputs(&self) -> usize
pub fn raw_dim(&self) -> D
pub fn shape(&self) -> &[usize]
source§impl<A, S> LinearParamsBase<S>where
S: RawData<Elem = A>,
impl<A, S> LinearParamsBase<S>where
S: RawData<Elem = A>,
source§impl<A, S, D> LinearParamsBase<S, D>where
D: RemoveAxis,
S: RawData<Elem = A>,
impl<A, S, D> LinearParamsBase<S, D>where
D: RemoveAxis,
S: RawData<Elem = A>,
source§impl<A, D> LinearParamsBase<OwnedRepr<A>, D>
impl<A, D> LinearParamsBase<OwnedRepr<A>, D>
pub fn init_uniform(self, biased: bool) -> Self
pub fn init_bias(self) -> Self
pub fn init_weight(self) -> Self
pub fn uniform(self) -> Self
Trait Implementations§
source§impl<A, S, D> Biased for LinearParamsBase<S, D>where
D: RemoveAxis,
S: RawData<Elem = A>,
impl<A, S, D> Biased for LinearParamsBase<S, D>where
D: RemoveAxis,
S: RawData<Elem = A>,
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<A, S, D> Clone for LinearParamsBase<S, D>
impl<A, S, D> Clone for LinearParamsBase<S, D>
source§impl<'a, A, S, D> Deserialize<'a> for LinearParamsBase<S, D>where
A: Deserialize<'a>,
D: Deserialize<'a> + RemoveAxis,
S: DataOwned<Elem = A>,
<D as Dimension>::Smaller: Deserialize<'a> + Dimension,
impl<'a, A, S, D> Deserialize<'a> for LinearParamsBase<S, D>where
A: Deserialize<'a>,
D: Deserialize<'a> + RemoveAxis,
S: DataOwned<Elem = A>,
<D as Dimension>::Smaller: Deserialize<'a> + Dimension,
source§fn deserialize<Der>(deserializer: Der) -> Result<Self, Der::Error>where
Der: Deserializer<'a>,
fn deserialize<Der>(deserializer: Der) -> Result<Self, Der::Error>where
Der: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<A> From<(ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>, A)> for LinearParamsBase<OwnedRepr<A>, Ix1>where
A: Clone,
impl<A> From<(ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>, A)> for LinearParamsBase<OwnedRepr<A>, Ix1>where
A: Clone,
source§impl<A> From<(ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>, Option<A>)> for LinearParamsBase<OwnedRepr<A>, Ix1>where
A: Clone,
impl<A> From<(ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>, Option<A>)> for LinearParamsBase<OwnedRepr<A>, Ix1>where
A: Clone,
source§impl<A, S, D> From<(ArrayBase<S, D>, ArrayBase<S, <D as Dimension>::Smaller>)> for LinearParamsBase<S, D>where
D: RemoveAxis,
S: RawData<Elem = A>,
impl<A, S, D> From<(ArrayBase<S, D>, ArrayBase<S, <D as Dimension>::Smaller>)> for LinearParamsBase<S, D>where
D: RemoveAxis,
S: RawData<Elem = A>,
source§impl<A, S, D> From<(ArrayBase<S, D>, Option<ArrayBase<S, <D as Dimension>::Smaller>>)> for LinearParamsBase<S, D>where
D: RemoveAxis,
S: RawData<Elem = A>,
impl<A, S, D> From<(ArrayBase<S, D>, Option<ArrayBase<S, <D as Dimension>::Smaller>>)> for LinearParamsBase<S, D>where
D: RemoveAxis,
S: RawData<Elem = A>,
source§impl<A, S> FromIterator<(ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>, Option<ArrayBase<OwnedRepr<A>, Dim<[usize; 0]>>>)> for LinearParamsBase<S, Ix2>
impl<A, S> FromIterator<(ArrayBase<OwnedRepr<A>, Dim<[usize; 1]>>, Option<ArrayBase<OwnedRepr<A>, Dim<[usize; 0]>>>)> for LinearParamsBase<S, Ix2>
source§impl<A, S> IntoIterator for LinearParamsBase<S>
impl<A, S> IntoIterator for LinearParamsBase<S>
source§impl<A, S, D> PartialEq<(ArrayBase<S, D>, ArrayBase<S, <D as Dimension>::Smaller>)> for LinearParamsBase<S, D>
impl<A, S, D> PartialEq<(ArrayBase<S, D>, ArrayBase<S, <D as Dimension>::Smaller>)> for LinearParamsBase<S, D>
source§impl<A, S, D> PartialEq<(ArrayBase<S, D>, Option<ArrayBase<S, <D as Dimension>::Smaller>>)> for LinearParamsBase<S, D>
impl<A, S, D> PartialEq<(ArrayBase<S, D>, Option<ArrayBase<S, <D as Dimension>::Smaller>>)> for LinearParamsBase<S, D>
source§impl<A, S, D> PartialEq for LinearParamsBase<S, D>
impl<A, S, D> PartialEq for LinearParamsBase<S, D>
source§impl<'a, A, B, T, S, D> Predict<A> for &'a LinearParamsBase<S, D>
impl<'a, A, B, T, S, D> Predict<A> for &'a LinearParamsBase<S, D>
source§impl<A, B, T, S, D> Predict<A> for LinearParamsBase<S, D>where
A: Dot<Array<T, D>, Output = B>,
B: for<'a> Add<&'a ArrayBase<S, D::Smaller>, Output = B>,
D: RemoveAxis,
S: Data<Elem = T>,
T: ComplexFloat,
impl<A, B, T, S, D> Predict<A> for LinearParamsBase<S, D>where
A: Dot<Array<T, D>, Output = B>,
B: for<'a> Add<&'a ArrayBase<S, D::Smaller>, Output = B>,
D: RemoveAxis,
S: Data<Elem = T>,
T: ComplexFloat,
source§impl<A, S, D> Serialize for LinearParamsBase<S, D>
impl<A, S, D> Serialize for LinearParamsBase<S, D>
source§impl<A, S, D> Weighted for LinearParamsBase<S, D>where
D: RemoveAxis,
S: RawData<Elem = A>,
impl<A, S, D> Weighted for LinearParamsBase<S, D>where
D: RemoveAxis,
S: RawData<Elem = A>,
impl<A, S, D> Copy for LinearParamsBase<S, D>where
A: Copy,
D: Copy + RemoveAxis,
S: Copy + RawDataClone<Elem = A>,
<D as Dimension>::Smaller: Copy,
Auto Trait Implementations§
impl<S, D> Freeze for LinearParamsBase<S, D>
impl<S, D> RefUnwindSafe for LinearParamsBase<S, D>where
S: RefUnwindSafe,
D: RefUnwindSafe,
<D as Dimension>::Smaller: RefUnwindSafe,
<S as RawData>::Elem: RefUnwindSafe,
impl<S, D> Send for LinearParamsBase<S, D>
impl<S, D> Sync for LinearParamsBase<S, D>
impl<S, D> Unpin for LinearParamsBase<S, D>
impl<S, D> UnwindSafe for LinearParamsBase<S, D>where
S: UnwindSafe,
D: UnwindSafe,
<D as Dimension>::Smaller: UnwindSafe,
<S as RawData>::Elem: RefUnwindSafe,
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