class_docstr: Computes the logarithm of the hyperbolic cosine of the prediction error.
  
  Formula:
  
  ```python
  error = y_pred - y_true
  logcosh = mean(log((exp(error) + exp(-error))/2), axis=-1)
  ```
  
  Args:
      name: (Optional) string name of the metric instance.
      dtype: (Optional) data type of the metric result.
  
  Examples:
  
  Standalone usage:
  
  >>> m = keras.metrics.LogCoshError()
  >>> m.update_state([[0, 1], [0, 0]], [[1, 1], [0, 0]])
  >>> m.result()
  0.10844523
  >>> m.reset_state()
  >>> m.update_state([[0, 1], [0, 0]], [[1, 1], [0, 0]],
  ...                sample_weight=[1, 0])
  >>> m.result()
  0.21689045
  
  Usage with `compile()` API:
  
  ```python
  model.compile(optimizer='sgd',
                loss='mse',
                metrics=[keras.metrics.LogCoshError()])
  ```
class_docstr_tok: ["Computes","the","logarithm","of","the","hyperbolic","cosine","of","the","prediction","error",".","Formula",":","``","`","python","error","=","y_pred","-","y_true","logcosh","=","mean","(","log","(","(","exp","(","error",")","+","exp","(","-error",")",")","\/2",")",",","axis=-1",")","``","`","Args",":","name",":","(","Optional",")","string","name","of","the","metric","instance",".","dtype",":","(","Optional",")","data","type","of","the","metric","result",".","Examples",":","Standalone","usage",":",">",">",">","m","=","keras.metrics.LogCoshError","(",")",">",">",">","m.update_state","(","[","[","0",",","1","]",",","[","0",",","0","]","]",",","[","[","1",",","1","]",",","[","0",",","0","]","]",")",">",">",">","m.result","(",")","0.10844523",">",">",">","m.reset_state","(",")",">",">",">","m.update_state","(","[","[","0",",","1","]",",","[","0",",","0","]","]",",","[","[","1",",","1","]",",","[","0",",","0","]","]",",","...","sample_weight=","[","1",",","0","]",")",">",">",">","m.result","(",")","0.21689045","Usage","with","`","compile","(",")","`","API",":","``","`","python","model.compile","(","optimizer='sgd","'",",","loss='mse","'",",","metrics=","[","keras.metrics.LogCoshError","(",")","]",")","``","`"]
code: def get_config(self):
      return {"name": self.name, "dtype": self.dtype}
  
imports: import warnings
  from keras import initializers
  from keras import ops
  from keras.api_export import keras_export
  from keras.losses.loss import squeeze_to_same_rank
  from keras.losses.losses import log_cosh
  from keras.losses.losses import mean_absolute_error
  from keras.losses.losses import mean_absolute_percentage_error
  from keras.losses.losses import mean_squared_error
  from keras.losses.losses import mean_squared_logarithmic_error
  from keras.metrics import reduction_metrics
  from keras.utils.numerical_utils import normalize
label_desc: Use image node_id 2 for calling the LogCoshError obj's underlying member method code with example usage: obj.get_config() and returns: dict