Enum dfdx::tensor_ops::WeightDecay
source · pub enum WeightDecay {
L2(f64),
Decoupled(f64),
}
Expand description
L2 and decoupled regularization methods
Variants§
L2(f64)
Weight decay applied to the gradients before any momentum updates. Equivalent to L2 regularization.
Decoupled(f64)
Weight decay applied after any momentum updates, without modifying the gradients. See Decoupled Weight Decay Regularization
Trait Implementations§
source§impl Clone for WeightDecay
impl Clone for WeightDecay
source§fn clone(&self) -> WeightDecay
fn clone(&self) -> WeightDecay
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 WeightDecay
impl Debug for WeightDecay
impl Copy for WeightDecay
Auto Trait Implementations§
impl RefUnwindSafe for WeightDecay
impl Send for WeightDecay
impl Sync for WeightDecay
impl Unpin for WeightDecay
impl UnwindSafe for WeightDecay
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