message: Move Head to the new summary API. This may change the names of summaries produced, but will avoid tag collisions.
diff: @@ -33,7 +33,6 @@ from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  -from tensorflow.python.ops import logging_ops
  from tensorflow.python.ops import lookup_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import metrics as metrics_lib
  @@ -635,10 +634,11 @@ def _create_model_fn_ops(features,
  if (mode != model_fn.ModeKeys.INFER) and (labels is not None):
  weight_tensor = _weight_tensor(features, weight_column_name)
  loss, weighted_average_loss = loss_fn(labels, logits, weight_tensor)
  - # Uses the deprecated API to set the tag explicitly.
  - # Without it, training and eval losses will show up in different graphs.
  - logging_ops.scalar_summary(
  - _summary_key(head_name, mkey.LOSS), weighted_average_loss)
  + # The name_scope escapism is needed to maintain the same summary tag
  + # after switching away from the now unsupported API.
  + with ops.name_scope(""):
  + summary_loss = array_ops.identity(weighted_average_loss)
  + summary.scalar(_summary_key(head_name, mkey.LOSS), summary_loss)
  if mode == model_fn.ModeKeys.TRAIN:
  if train_op_fn is None:
  @@ -1484,8 +1484,12 @@ class _LossOnlyHead(Head):
  loss = self._loss_fn()
  if isinstance(loss, list):
  loss = math_ops.add_n(loss)
  - logging_ops.scalar_summary(
  - _summary_key(self.head_name, mkey.LOSS), loss)
  + # The name_scope escapism is needed to maintain the same summary tag
  + # after switching away from the now unsupported API.
  + with ops.name_scope(""):
  + summary_loss = array_ops.identity(loss)
  + summary.scalar(_summary_key(self.head_name, mkey.LOSS),
  + summary_loss)
  if mode == model_fn.ModeKeys.TRAIN:
  if train_op_fn is None:
  raise ValueError("train_op_fn can not be None in TRAIN mode")
  