class_docstr: Override `LinearOperatorDiag` logdet to use Kahan summation.
class_docstr_tok: ["Override","`","LinearOperatorDiag","`","logdet","to","use","Kahan","summation","."]
code: def _log_abs_determinant(self):
      log_det = generic.reduce_kahan_sum(
          tf.math.log(tf.math.abs(self._diag)), axis=[-1]
      ).total
      if dtype_util.is_complex(self.dtype):
          log_det = tf.cast(log_det, dtype=self.dtype)
      return log_det
  
file_path: probability/tensorflow_probability/python/distributions/mvn_diag.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import mvn_linear_operator
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math import generic
  from tensorflow.python.ops.linalg import linear_operator
label_desc: Use image node_id 1 for calling the KahanLogDetLinOpDiag obj's underlying member method code with example usage: obj._log_abs_determinant() and returns: log_det