title: How to name custom metrics in Keras fit output
body: <p>I am using custom metrics when training my Keras model. It works fine, except that the metrics names in the output of <code>model.fit_generator(...)</code> are not interpretable (NB: Tensorboard also uses these wrong names).</p>
  
  <p>Here is a reproducible example of what I am doing: the metrics are using one parameter (in addition to the prediction and ground truth), so I defined a factory to generate a parameterless metric function, similar to this:</p>
  
  <pre><code>def my_dummy_metric(y_true, y_pred, the_param=1.0):
      return the_param * keras.backend.ones((1))
  
  def my_metric_factory(the_param=1.0):
      def fn(y_true, y_pred):
          return my_dummy_metric(y_true, y_pred, the_param=the_param)
  
      return fn
  
  my_second_metric = my_metric_factory(2.0)
  my_other_metric = my_metric_factory(3.14)
  </code></pre>
  
  <p>Then I compile and train my model:</p>
  
  <pre><code>model.compile(my_optim, my_loss, [my_second_metric, my_other_metric])
  history = model.fit_generator(...)
  print(history.params['metrics'])
  </code></pre>
  
  <p>My trouble is that the metric names in <code>history</code> are <code>fn</code>, <code>fn_1</code>, <code>val_fn</code> and <code>val_fn_1</code>. These names are also used by Tensorboard and you need to know the implem details to understand them.</p>
  
  <p>On the contrary, I don't have this problem when using a simple custom function, without factory:</p>
  
  <pre><code>model.compile(my_optim, my_loss, [my_dummy_metric])
  history = model.fit_generator(...)
  print(history.params['metrics'])
  </code></pre>
  
  <p>Would it be possible to obtain <code>my_XXX_metric</code> as output names also in the factory-based use case?</p>
  
  <p><strong>Environment:</strong> Using Keras 2.2.4, TF 1.14.0, Python 3.7</p>