deel.lip.initializers
This module contains extra Keras initializers, e.g. SpectralInitializer for 1-Lipschitz matrix initialization. They can be used as kernel initializers in any Keras layer.
SpectralInitializer ¶
SpectralInitializer(
eps_spectral=DEFAULT_EPS_SPECTRAL,
eps_bjorck=DEFAULT_EPS_BJORCK,
beta_bjorck=DEFAULT_BETA_BJORCK,
k_coef_lip=1.0,
base_initializer="orthogonal",
)
Bases: Initializer
Initialize a kernel to be 1-lipschitz orthogonal using bjorck normalization.
PARAMETER | DESCRIPTION |
---|---|
eps_spectral |
stopping criterion of iterative power method
TYPE:
|
eps_bjorck |
float greater than 0, stopping criterion of bjorck algorithm, setting it to None disable orthogonalization
TYPE:
|
beta_bjorck |
beta parameter of bjorck algorithm
TYPE:
|
base_initializer |
method used to generate weights before applying the orthonormalization
TYPE:
|
Source code in deel/lip/initializers.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|