parameters: (metric_config)
return_statement: return metrics_module.deserialize(metric_config)
docstring: Deserialize metrics, leaving special strings untouched.
docstring_summary: Deserialize metrics, leaving special strings untouched.
docstring_tokens: Deserialize metrics leaving special strings untouched .
function: def _deserialize_metric(metric_config):
    """Deserialize metrics, leaving special strings untouched."""
    from tensorflow.python.keras import metrics as metrics_module  # pylint:disable=g-import-not-at-top
    if metric_config in ['accuracy', 'acc', 'crossentropy', 'ce']:
      # Do not deserialize accuracy and cross-entropy strings as we have special
      # case handling for these in compile, based on model output shape.
      return metric_config
    return metrics_module.deserialize(metric_config)
function_tokens: def _deserialize_metric ( metric_config ) : from tensorflow . python . keras import metrics as metrics_module # pylint:disable=g-import-not-at-top if metric_config in [ 'accuracy' , 'acc' , 'crossentropy' , 'ce' ] : # Do not deserialize accuracy and cross-entropy strings as we have special # case handling for these in compile, based on model output shape. return metric_config return metrics_module . deserialize ( metric_config )