pub struct LecunNormal { /* private fields */ }
Expand description
LecunNormal is a truncated normal distribution centered at 0 with a standard deviation that is calculated as:
$$ \sigma = {n_{in}}^{-\frac{1}{2}} $$
where $n_{in}
$ is the number of input units.
Implementations§
Source§impl LecunNormal
impl LecunNormal
pub const fn new(n: usize) -> LecunNormal
Sourcepub fn distr<F>(&self) -> Result<TruncatedNormal<F>, InitError>
pub fn distr<F>(&self) -> Result<TruncatedNormal<F>, InitError>
Create a truncated normal distribution centered at 0; See Self::std_dev for the standard deviation calculations.
Trait Implementations§
Source§impl Clone for LecunNormal
impl Clone for LecunNormal
Source§fn clone(&self) -> LecunNormal
fn clone(&self) -> LecunNormal
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LecunNormal
impl Debug for LecunNormal
Source§impl<F> Distribution<F> for LecunNormal
impl<F> Distribution<F> for LecunNormal
Source§impl Hash for LecunNormal
impl Hash for LecunNormal
Source§impl Ord for LecunNormal
impl Ord for LecunNormal
Source§fn cmp(&self, other: &LecunNormal) -> Ordering
fn cmp(&self, other: &LecunNormal) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LecunNormal
impl PartialEq for LecunNormal
Source§impl PartialOrd for LecunNormal
impl PartialOrd for LecunNormal
impl Copy for LecunNormal
impl Eq for LecunNormal
impl StructuralPartialEq for LecunNormal
Auto Trait Implementations§
impl Freeze for LecunNormal
impl RefUnwindSafe for LecunNormal
impl Send for LecunNormal
impl Sync for LecunNormal
impl Unpin for LecunNormal
impl UnwindSafe for LecunNormal
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> CallInPlace<T> for Twhere
T: CallInto<T>,
impl<T> CallInPlace<T> for Twhere
T: CallInto<T>,
Source§fn call_inplace<F>(&mut self, f: F) -> <T as CallInto<T>>::Output
fn call_inplace<F>(&mut self, f: F) -> <T as CallInto<T>>::Output
The
call_on_mut
method allows an object to be passed onto a function that takes a mutable reference
to the object. This is useful for cases where you want to perform an operation on
an object and mutate it in the process.Source§impl<T> CallInto<T> for T
impl<T> CallInto<T> for T
Source§impl<T> CallOn<T> for Twhere
T: CallInto<T>,
impl<T> CallOn<T> for Twhere
T: CallInto<T>,
Source§fn call_on<F>(&self, f: F) -> <T as CallInto<T>>::Output
fn call_on<F>(&self, f: F) -> <T as CallInto<T>>::Output
The
call_on
method allows an object to be passed onto a function that takes a reference
to the object. This is useful for cases where you want to perform an operation on
an object without needing to extract it from a container or context.