code: def log_loss(
      predictions: Array,
      targets: Array,
  ) -> Array:
      """Calculates the log loss of predictions wrt targets.
  
      Args:
        predictions: a vector of probabilities of arbitrary shape.
        targets: a vector of probabilities of shape compatible with predictions.
  
      Returns:
        a vector of same shape of `predictions`.
      """
      chex.assert_type([predictions, targets], float)
      return -jnp.log(likelihood(predictions, targets))
  
file_path: rlax/rlax/_src/losses.py
imports: import functools
  from typing import Optional, Union
  import chex
  import jax
  import jax.numpy
  from rlax._src import general_value_functions
  from rlax._src import value_learning
label_desc: Use image node_id 3 for calling a global function with example usage: log_loss(predictions, targets) and returns: unknown