class_docstr: Wrap a stateless metric function with the Mean metric.
  
  You could use this class to quickly build a mean metric from a function. The
  function needs to have the signature `fn(y_true, y_pred)` and return a
  per-sample loss array. `MeanMetricWrapper.result()` will return
  the average metric value across all samples seen so far.
  
  For example:
  
  ```python
  def mse(y_true, y_pred):
      return (y_true - y_pred) ** 2
  
  mse_metric = MeanMetricWrapper(fn=mse)
  ```
  
  Args:
      fn: The metric function to wrap, with signature
          `fn(y_true, y_pred, **kwargs)`.
      name: (Optional) string name of the metric instance.
      dtype: (Optional) data type of the metric result.
      **kwargs: Keyword arguments to pass on to `fn`.
class_docstr_tok: ["Wrap","a","stateless","metric","function","with","the","Mean","metric",".","You","could","use","this","class","to","quickly","build","a","mean","metric","from","a","function",".","The","function","needs","to","have","the","signature","`","fn","(","y_true",",","y_pred",")","`","and","return","a","per-sample","loss","array",".","`","MeanMetricWrapper.result","(",")","`","will","return","the","average","metric","value","across","all","samples","seen","so","far",".","For","example",":","``","`","python","def","mse","(","y_true",",","y_pred",")",":","return","(","y_true","-","y_pred",")","*","*","2","mse_metric","=","MeanMetricWrapper","(","fn=mse",")","``","`","Args",":","fn",":","The","metric","function","to","wrap",",","with","signature","`","fn","(","y_true",",","y_pred",",","*","*","kwargs",")","`",".","name",":","(","Optional",")","string","name","of","the","metric","instance",".","dtype",":","(","Optional",")","data","type","of","the","metric","result",".","*","*","kwargs",":","Keyword","arguments","to","pass","on","to","`","fn","`","."]
code: def get_config(self):
      base_config = super().get_config()
      config = {
          "fn": serialization_lib.serialize_keras_object(self._fn)
      }
      config.update(
          serialization_lib.serialize_keras_object(self._fn_kwargs)
      )
      return {**base_config, **config}
  
imports: from keras import backend
  from keras import initializers
  from keras import losses
  from keras import ops
  from keras.api_export import keras_export
  from keras.metrics.metric import Metric
  from keras.saving import serialization_lib
label_desc: Use image node_id 3 for calling the MeanMetricWrapper obj's underlying member method code with example usage: obj.get_config() and returns: dict