ott.solvers.linear.continuous_barycenter.FreeWassersteinBarycenter.init_state#
- FreeWassersteinBarycenter.init_state(bar_prob, bar_size, x_init=None, rng=None)[source]#
Initialize the state of the Wasserstein barycenter iterations.
- Parameters:
bar_prob (
FreeBarycenterProblem
) – The barycenter problem.bar_size (
int
) – Size of the barycenter.x_init (
Optional
[Array
]) – Initial barycenter estimate of shape[bar_size, ndim]
. If None,bar_size
points will be sampled from the input measures according to their weightsflattened_y
.rng (
Optional
[PRNGKeyArray
]) – Random key for seeding.
- Return type:
- Returns:
The initial barycenter state.