class_docstr: A LossFn calculates a loss on a single batch of data.
docstr: Calculates a loss on a single batch of data.
docstr_tok: ["Calculates","a","loss","on","a","single","batch","of","data","."]
code: def __call__(
      self,
      network: networks_lib.TypedFeedForwardNetwork,
      params: networks_lib.Params,
      target_params: networks_lib.Params,
      batch: reverb.ReplaySample,
      key: networks_lib.PRNGKey,
  ) -> Tuple[jax.Array, LossExtra]:
      """Calculates a loss on a single batch of data."""
  
imports: import functools
  import time
  from typing import Dict, Iterator, List, NamedTuple, Optional, Tuple
  import acme
  from acme.adders import reverb
  from acme.jax import networks
  from acme.jax import utils
  from acme.utils import async_utils
  from acme.utils import counting
  from acme.utils import loggers
  import jax
  import jax.numpy
  import optax
  import reverb
  import tree
  import typing_extensions
label_desc: Use image node_id 1 for calling the LossFn obj's underlying member method code with example usage: obj.__call__(network, params, target_params, batch, key) without return types