deel.lip.initializers module

class deel.lip.initializers.BjorckInitializer(niter_spectral=3, niter_bjorck=15, base_initializer=<tensorflow.python.ops.init_ops_v2.Orthogonal object>)

Bases: tensorflow.python.ops.init_ops_v2.Initializer

Initialize a kernel to be 1-lipschitz almost everywhere using bjorck normalization.

Parameters
  • niter_spectral – number of iteration to do with the iterative power method

  • niter_bjorck – number of iteration to do with the bjorck algorithm

  • base_initializer – method used to generate weights before applying the orthonormalization

get_config()

Returns the configuration of the initializer as a JSON-serializable dict.

Returns

A JSON-serializable Python dict.

class deel.lip.initializers.SpectralInitializer(niter_spectral=3, base_initializer=<tensorflow.python.ops.init_ops_v2.Orthogonal object>)

Bases: tensorflow.python.ops.init_ops_v2.Initializer

Initialize a kernel to be 1-lipschitz using spectral normalization (iterative power method).

Parameters
  • niter_spectral – number of iteration to do with the iterative power method

  • base_initializer – method used to generate weights before applying iterative power method

get_config()

Returns the configuration of the initializer as a JSON-serializable dict.

Returns

A JSON-serializable Python dict.