ott.neural.networks.layers.posdef.PosDefPotentials.init_from_samples

ott.neural.networks.layers.posdef.PosDefPotentials.init_from_samples#

classmethod PosDefPotentials.init_from_samples(source, target, **kwargs)[source]#

Initialize the layer using Gaussian approximation [Bunne et al., 2022].

Parameters:
  • source (Array) – Samples from the source distribution, array of shape [n, d].

  • target (Array) – Samples from the target distribution, array of shape [m, d].

  • kwargs (Any) – Keyword arguments for initialization. Note that use_linear will be always set to True.

Return type:

PosDefPotentials

Returns:

The layer with fixed linear and quadratic initialization.