It looks like you might be able to do it by overloading the metrics property.

  

      github.com
  

  
    tensorflow/tensorflow/blob/master/tensorflow/python/keras/engine/training.py#L672-L683 1



      
      
          metrics = []
          if self._is_compiled:
            # TODO(omalleyt): Track `LossesContainer` and `MetricsContainer` objects
            # so that attr names are not load-bearing.
            if self.compiled_loss is not None:
              metrics += self.compiled_loss.metrics
            if self.compiled_metrics is not None:
              metrics += self.compiled_metrics.metrics
          
          
for l in self._flatten_layers():
            metrics.extend(l._metrics)  # pylint: disable=protected-access
          return metrics
      
    
  


  

  
    
    
  

  


But IDK what else could go wrong there.