ott.solvers.linear.continuous_barycenter.WassersteinBarycenter.init_state
ott.solvers.linear.continuous_barycenter.WassersteinBarycenter.init_state#
- WassersteinBarycenter.init_state(bar_prob, bar_size, x_init=None, rng=0)[source]#
Initialize the state of the Wasserstein barycenter iterations.
- Parameters
bar_prob (
BarycenterProblem) – 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.rng (
int) – Seed forjax.random.PRNGKey().
- Return type
- Returns
The initial barycenter state.