Struct candle_nn::batch_norm::BatchNormConfig
source · pub struct BatchNormConfig {
pub eps: f64,
pub remove_mean: bool,
pub affine: bool,
pub momentum: f64,
}
Fields§
§eps: f64
§remove_mean: bool
§affine: bool
The meaning of affine here is different from LayerNorm: when false there is no learnable parameter at all, 1 used for gamma and 0 for beta.
momentum: f64
Controls exponential moving average of running stats. Defaults to 0.1
running_stat * (1.0 - momentum) + stat * momentum
.
Trait Implementations§
source§impl Clone for BatchNormConfig
impl Clone for BatchNormConfig
source§fn clone(&self) -> BatchNormConfig
fn clone(&self) -> BatchNormConfig
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 BatchNormConfig
impl Debug for BatchNormConfig
source§impl Default for BatchNormConfig
impl Default for BatchNormConfig
source§impl From<f64> for BatchNormConfig
impl From<f64> for BatchNormConfig
source§impl PartialEq for BatchNormConfig
impl PartialEq for BatchNormConfig
source§fn eq(&self, other: &BatchNormConfig) -> bool
fn eq(&self, other: &BatchNormConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for BatchNormConfig
impl StructuralPartialEq for BatchNormConfig
Auto Trait Implementations§
impl Freeze for BatchNormConfig
impl RefUnwindSafe for BatchNormConfig
impl Send for BatchNormConfig
impl Sync for BatchNormConfig
impl Unpin for BatchNormConfig
impl UnwindSafe for BatchNormConfig
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