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
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more