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) -> Self
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