parameters: (self)
return_statement: return det
docstring: Log determinant of every batch member.
docstring_summary: Log determinant of every batch member.
docstring_tokens: Log determinant of every batch member .
function: def _batch_log_det(self):
      """Log determinant of every batch member."""
      # Note that array_ops.diag_part does not seem more efficient for non-batch,
      # and would give a bad result for a batch matrix, so aways use
      # matrix_diag_part.
      diag = array_ops.matrix_diag_part(self._chol)
      det = 2.0 * math_ops.reduce_sum(math_ops.log(diag), reduction_indices=[-1])
      det.set_shape(self.get_shape()[:-2])
      return det
function_tokens: def _batch_log_det ( self ) : # Note that array_ops.diag_part does not seem more efficient for non-batch, # and would give a bad result for a batch matrix, so aways use # matrix_diag_part. diag = array_ops . matrix_diag_part ( self . _chol ) det = 2.0 * math_ops . reduce_sum ( math_ops . log ( diag ) , reduction_indices = [ - 1 ] ) det . set_shape ( self . get_shape ( ) [ : - 2 ] ) return det