deel.lip.normalizers module¶
This module contains computation function, for BjorckNormalizer and spectral normalization. This is done for internal use only.
-
deel.lip.normalizers.
bjorck_normalization
(w, niter=15)¶ apply Bjorck normalization on w.
- Parameters
w – weight to normalize, in order to work properly, we must have max_eigenval(w) ~= 1
niter – number of iterations
- Returns
the orthonormal weights
-
deel.lip.normalizers.
spectral_normalization
(kernel, u=None, niter=3)¶ Normalize the kernel to have it’s max eigenvalue == 1.
- Parameters
kernel – the kernel to normalize
u – initialization for the max eigen vector
niter – number of iteration
- Returns
the normalized kernel w_bar, it’s shape, the maximum eigen vector, and the maximum eigen value