from tensorflow.python.framework import ops


    train_ops = self._get_linear_training_ops(
        linear_grads, linear_vars) + self._get_dnn_training_ops(dnn_grads,
                                                                dnn_vars)

    train_step = control_flow_ops.group(*train_ops, name="combined_training_op")
    with ops.control_dependencies([train_step]):
      with ops.get_default_graph().colocate_with(global_step):
        return state_ops.assign_add(global_step, 1).op, loss

  def _run_metrics(self, predictions, targets, metrics, weights):
    result = {}
