class_docstr: A container class for metrics passed to `Model.compile`.
class_docstr_tok: ["A","container","class","for","metrics","passed","to","`","Model.compile","`","."]
docstr: Initializes a container for metrics.
  
  Arguments:
    metrics: see the `metrics` argument from `tf.keras.Model.compile`.
    weighted_metrics: see the `weighted_metrics` argument from
      `tf.keras.Model.compile`.
    output_names: A list of strings of names of outputs for the model.
    from_serialized: Whether the model being compiled is from a serialized
      model.  Used to avoid redundantly applying pre-processing renaming
      steps.
code: def __init__(
      self,
      metrics=None,
      weighted_metrics=None,
      output_names=None,
      from_serialized=False,
  ):
      """Initializes a container for metrics.
  
      Arguments:
        metrics: see the `metrics` argument from `tf.keras.Model.compile`.
        weighted_metrics: see the `weighted_metrics` argument from
          `tf.keras.Model.compile`.
        output_names: A list of strings of names of outputs for the model.
        from_serialized: Whether the model being compiled is from a serialized
          model.  Used to avoid redundantly applying pre-processing renaming
          steps.
      """
      super(MetricsContainer, self).__init__(output_names=output_names)
  
      # Keep user-supplied values untouched for recompiling and serialization.
      self._user_metrics = metrics
      self._user_weighted_metrics = weighted_metrics
  
      self._metrics = metrics
      self._weighted_metrics = weighted_metrics
      self._built = False
  
      self._from_serialized = from_serialized
  
imports: import copy
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.keras import losses
  from tensorflow.python.keras import metrics
  from tensorflow.python.keras.utils import generic_utils
  from tensorflow.python.keras.utils import losses_utils
  from tensorflow.python.keras.utils import tf_utils
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 to create a new MetricsContainer object from inherited base classes: Container with example: obj = MetricsContainer(metrics, weighted_metrics, output_names, from_serialized)