from tensorflow.python.framework import ops

          default_optimizer="Ftrl",
          default_learning_rate=1. / math.sqrt(len(
              self._get_linear_feature_columns())))
      return [
          self._linear_optimizer.apply_gradients(zip(linear_grads, linear_vars))
      ]
    return []

  def _get_dnn_vars(self):
    if self._get_dnn_feature_columns():
      return ops.get_collection(self._dnn_weight_collection)
    return []

  def _get_dnn_training_ops(self, dnn_grads, dnn_vars):
    if self._get_dnn_feature_columns():
      self._dnn_optimizer = self._get_optimizer(self._dnn_optimizer,
                                                default_optimizer="Adagrad",
                                                default_learning_rate=0.05)
      return [self._dnn_optimizer.apply_gradients(zip(dnn_grads, dnn_vars))]
    return []
