(x, mu, diag_sigma)
return -0.5 * (a + b + c)
Returns `log N(x | mu, eye(diag_sigma))`.

  Args:
    x: <tbd>
    mu: <tbd>
    diag_sigma: <tbd>
Returns `log N(x | mu, eye(diag_sigma))`.
Returns log N ( x | mu eye ( diag_sigma )) .
def log_gaussian_diag_pdf(x, mu, diag_sigma):  # pylint: disable=invalid-name
  """Returns `log N(x | mu, eye(diag_sigma))`.

  Args:
    x: <tbd>
    mu: <tbd>
    diag_sigma: <tbd>
  """
  a = mu.shape[-1] * jnp.log(2 * jnp.pi)
  b = jnp.sum(jnp.log(diag_sigma), axis=-1)
  y = x - mu / diag_sigma
  y = jnp.expand_dims(y, axis=-1)
  xm = jnp.expand_dims(x - mu, axis=-2)
  c = jnp.matmul(xm, y)
  c = jnp.squeeze(jnp.squeeze(c, axis=-1), axis=-1)
  return -0.5 * (a + b + c)
def log_gaussian_diag_pdf ( x , mu , diag_sigma ) : # pylint: disable=invalid-name a = mu . shape [ - 1 ] * jnp . log ( 2 * jnp . pi ) b = jnp . sum ( jnp . log ( diag_sigma ) , axis = - 1 ) y = x - mu / diag_sigma y = jnp . expand_dims ( y , axis = - 1 ) xm = jnp . expand_dims ( x - mu , axis = - 2 ) c = jnp . matmul ( xm , y ) c = jnp . squeeze ( jnp . squeeze ( c , axis = - 1 ) , axis = - 1 ) return - 0.5 * ( a + b + c )