pub struct MaxNormRegularization {
pub max_norm: f64,
pub lambda: f64,
pub axis: usize,
}Expand description
MaxNorm constraint regularizer.
Constrains the norm of weight vectors to a maximum value. Useful for preventing exploding gradients and improving stability.
§References
- Hinton et al.: “Improving neural networks by preventing co-adaptation”
Fields§
§max_norm: f64Maximum allowed norm
lambda: f64Regularization strength
axis: usizeAxis along which to compute norms (0 for rows, 1 for columns)
Implementations§
Trait Implementations§
Source§impl Clone for MaxNormRegularization
impl Clone for MaxNormRegularization
Source§fn clone(&self) -> MaxNormRegularization
fn clone(&self) -> MaxNormRegularization
Returns a duplicate 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 MaxNormRegularization
impl Debug for MaxNormRegularization
Source§impl Default for MaxNormRegularization
impl Default for MaxNormRegularization
Source§impl Regularizer for MaxNormRegularization
impl Regularizer for MaxNormRegularization
Auto Trait Implementations§
impl Freeze for MaxNormRegularization
impl RefUnwindSafe for MaxNormRegularization
impl Send for MaxNormRegularization
impl Sync for MaxNormRegularization
impl Unpin for MaxNormRegularization
impl UnwindSafe for MaxNormRegularization
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§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