pub struct XavierUniform<T>where
T: SampleUniform,{ /* private fields */ }
Expand description
Uniform Xavier initializers use a uniform distribution to initialize the weights of a neural network within a given range.
Implementations§
Source§impl<T> XavierUniform<T>where
T: SampleUniform,
impl<T> XavierUniform<T>where
T: SampleUniform,
pub fn new(inputs: usize, outputs: usize) -> Result<XavierUniform<T>, InitError>where
T: Float + FromPrimitive,
Trait Implementations§
Source§impl<T> Clone for XavierUniform<T>
impl<T> Clone for XavierUniform<T>
Source§fn clone(&self) -> XavierUniform<T>
fn clone(&self) -> XavierUniform<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> Distribution<T> for XavierUniform<T>where
T: Float + SampleUniform,
impl<T> Distribution<T> for XavierUniform<T>where
T: Float + SampleUniform,
Source§impl<T> PartialEq for XavierUniform<T>
impl<T> PartialEq for XavierUniform<T>
impl<T> Copy for XavierUniform<T>
impl<T> Eq for XavierUniform<T>
Auto Trait Implementations§
impl<T> Freeze for XavierUniform<T>
impl<T> RefUnwindSafe for XavierUniform<T>
impl<T> Send for XavierUniform<T>
impl<T> Sync for XavierUniform<T>
impl<T> Unpin for XavierUniform<T>
impl<T> UnwindSafe for XavierUniform<T>
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.