Enum juice::weight::FillerType
source · pub enum FillerType {
Constant {
value: f32,
},
Glorot {
input_size: usize,
output_size: usize,
},
}
Expand description
Enum for specifing the type of Filler.
Variants§
Constant
Fills the weight blob with a constant value
(all values are the same).
Glorot
Fields
Fills the weight blobs based on the paper:
[Bengio and Glorot 2010]: Understanding the difficulty of training deep feedforward neural networks.
Also known as Xavier filler.
Implementations§
source§impl FillerType
impl FillerType
sourcepub fn fill(&self, weight: &mut SharedTensor<f32>)
pub fn fill(&self, weight: &mut SharedTensor<f32>)
Uses a filler as specified by this FillerType to fill the values in a SharedTensor
This filling of weights is usually done directly after creation of the weight blob.
sourcepub fn fill_constant(weight: &mut SharedTensor<f32>, value: f32)
pub fn fill_constant(weight: &mut SharedTensor<f32>, value: f32)
Directly use the Constant Filler.
sourcepub fn fill_glorot(
weight: &mut SharedTensor<f32>,
num_inputs: usize,
num_outputs: usize
)
pub fn fill_glorot( weight: &mut SharedTensor<f32>, num_inputs: usize, num_outputs: usize )
Directly use the Glorot Filler.
Trait Implementations§
source§impl Clone for FillerType
impl Clone for FillerType
source§fn clone(&self) -> FillerType
fn clone(&self) -> FillerType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FillerType
impl Debug for FillerType
impl Copy for FillerType
Auto Trait Implementations§
impl RefUnwindSafe for FillerType
impl Send for FillerType
impl Sync for FillerType
impl Unpin for FillerType
impl UnwindSafe for FillerType
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