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_sizepoints will be sampled from the input measures according to their weightsflattened_y.
- Return type:
- Returns:
The initial barycenter state.