at least not consciously

That function update_confusion_matrix_variables is called internally by some metrics.



 raft:

loss and with metrics other than BinaryAccuracy, for example Precision or AUC metrics


E.g. Precision

  

      github.com
  

  
    tensorflow/tensorflow/blob/master/tensorflow/python/keras/metrics.py#L1343 1



      
      
            y_true: The ground truth values, with the same dimensions as `y_pred`.
              Will be cast to `bool`.
            y_pred: The predicted values. Each element must be in the range `[0, 1]`.
            sample_weight: Optional weighting of each example. Defaults to 1. Can be a
              `Tensor` whose rank is either 0, or the same rank as `y_true`, and must
              be broadcastable to `y_true`.
          
          
Returns:
            Update op.
          """
          return metrics_utils.update_confusion_matrix_variables(
              {
                  metrics_utils.ConfusionMatrix.TRUE_POSITIVES: self.true_positives,
                  metrics_utils.ConfusionMatrix.FALSE_POSITIVES: self.false_positives
              },
              y_true,
              y_pred,
              thresholds=self.thresholds,
              thresholds_distributed_evenly=self._thresholds_distributed_evenly,
              top_k=self.top_k,
              class_id=self.class_id,
      
    
  


  

  
    
    
  

  


E.g. AUC
  

      github.com
  

  
    tensorflow/tensorflow/blob/master/tensorflow/python/keras/metrics.py#L2262



      
      
          
          
# Only forward label_weights to update_confusion_matrix_variables when
          # multi_label is False. Otherwise the averaging of individual label AUCs is
          # handled in AUC.result
          label_weights = None if self.multi_label else self.label_weights
          
          
if self._from_logits:
            y_pred = activations.sigmoid(y_pred)
          
          
with ops.control_dependencies(deps):
            return metrics_utils.update_confusion_matrix_variables(
                {
                    metrics_utils.ConfusionMatrix.TRUE_POSITIVES:
                        self.true_positives,
                    metrics_utils.ConfusionMatrix.TRUE_NEGATIVES:
                        self.true_negatives,
                    metrics_utils.ConfusionMatrix.FALSE_POSITIVES:
                        self.false_positives,
                    metrics_utils.ConfusionMatrix.FALSE_NEGATIVES:
                        self.false_negatives,
                },