pub struct XavierNormal<T>where
StandardNormal: Distribution<T>,{ /* private fields */ }
Expand description
Normal Xavier initializers leverage a normal distribution centered around 0
and using a
standard deviation ($\sigma$) computed by:
\sigma = \sqrt{\frac{2}{d_{in} + d_{out}}}
Implementations§
Source§impl<T> XavierNormal<T>
impl<T> XavierNormal<T>
Trait Implementations§
Source§impl<T> Clone for XavierNormal<T>
impl<T> Clone for XavierNormal<T>
Source§fn clone(&self) -> XavierNormal<T>
fn clone(&self) -> XavierNormal<T>
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<T> Debug for XavierNormal<T>
impl<T> Debug for XavierNormal<T>
Source§impl<T> Distribution<T> for XavierNormal<T>
impl<T> Distribution<T> for XavierNormal<T>
Source§impl<T> Hash for XavierNormal<T>
impl<T> Hash for XavierNormal<T>
Source§impl<T> Ord for XavierNormal<T>
impl<T> Ord for XavierNormal<T>
Source§fn cmp(&self, other: &XavierNormal<T>) -> Ordering
fn cmp(&self, other: &XavierNormal<T>) -> 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<T> PartialEq for XavierNormal<T>
impl<T> PartialEq for XavierNormal<T>
Source§impl<T> PartialOrd for XavierNormal<T>
impl<T> PartialOrd for XavierNormal<T>
impl<T> Copy for XavierNormal<T>
impl<T> Eq for XavierNormal<T>
impl<T> StructuralPartialEq for XavierNormal<T>where
StandardNormal: Distribution<T>,
Auto Trait Implementations§
impl<T> Freeze for XavierNormal<T>where
T: Freeze,
impl<T> RefUnwindSafe for XavierNormal<T>where
T: RefUnwindSafe,
impl<T> Send for XavierNormal<T>where
T: Send,
impl<T> Sync for XavierNormal<T>where
T: Sync,
impl<T> Unpin for XavierNormal<T>where
T: Unpin,
impl<T> UnwindSafe for XavierNormal<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> 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.