MCPcopy Create free account
hub / github.com/LeCAR-Lab/model-based-diffusion / cma_es_update

Function cma_es_update

mbd/planners/path_integral.py:40–45  ·  view source on GitHub ↗
(weights, Y0s, sigma, mu_0t)

Source from the content-addressed store, hash-verified

38
39@jax.jit
40def cma_es_update(weights, Y0s, sigma, mu_0t):
41 mu_0tm1 = jnp.einsum("n,nij->ij", weights, Y0s)
42 Yerr = Y0s - mu_0t
43 sigma = jnp.sqrt(jnp.einsum("n,nij->ij", weights, Yerr**2)).mean() * sigma
44 sigma = jnp.maximum(sigma, 1e-3)
45 return mu_0tm1, sigma
46
47
48@jax.jit

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected