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

Method eval_xref_logpd

mbd/envs/car2d.py:96–102  ·  view source on GitHub ↗
(self, xs)

Source from the content-addressed store, hash-verified

94
95 @partial(jax.jit, static_argnums=(0,))
96 def eval_xref_logpd(self, xs):
97 xs_err = xs[:, :2] - self.xref[:, :2]
98 # theta_err = xs[:, 3] - self.thetaref
99 logpd = 0.0-(
100 (jnp.clip(jnp.linalg.norm(xs_err, axis=-1), 0.0, 0.5) / 0.5) ** 2
101 ).mean(axis=-1)
102 return logpd
103
104 @property
105 def action_size(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected