pub struct SpectralNormalization {
pub target_norm: f64,
pub lambda: f64,
pub power_iterations: usize,
}Expand description
Spectral Normalization regularizer.
Normalizes weight matrices by their spectral norm (largest singular value). Useful for stabilizing GAN training and improving generalization.
§References
- Miyato et al. (2018): “Spectral Normalization for Generative Adversarial Networks”
Fields§
§target_norm: f64Target spectral norm (usually 1.0)
lambda: f64Strength of the regularization
power_iterations: usizeNumber of power iterations for spectral norm estimation
Implementations§
Trait Implementations§
Source§impl Clone for SpectralNormalization
impl Clone for SpectralNormalization
Source§fn clone(&self) -> SpectralNormalization
fn clone(&self) -> SpectralNormalization
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 SpectralNormalization
impl Debug for SpectralNormalization
Source§impl Default for SpectralNormalization
impl Default for SpectralNormalization
Source§impl Regularizer for SpectralNormalization
impl Regularizer for SpectralNormalization
Auto Trait Implementations§
impl Freeze for SpectralNormalization
impl RefUnwindSafe for SpectralNormalization
impl Send for SpectralNormalization
impl Sync for SpectralNormalization
impl Unpin for SpectralNormalization
impl UnwindSafe for SpectralNormalization
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