from tensorflow.contrib.layers.python.layers import feature_column

          constant_op.constant(
              iris.target, dtype=dtypes.int32), (-1, 1))
      return features, labels

    iris = test_data.prepare_iris_data_for_logistic_regression()
    cont_features = [
        feature_column.real_valued_column(str(i)) for i in range(4)
    ]
    linear_features = [
        feature_column.bucketized_column(
            cont_features[i],
            test_data.get_quantile_based_buckets(iris.data[:, i], 10))
        for i in range(4)
    ]
    linear_features.append(
        feature_column.sparse_column_with_hash_bucket(
            'dummy_sparse_column', hash_bucket_size=100))

    classifier = dnn_linear_combined.DNNLinearCombinedClassifier(
        model_dir=tempfile.mkdtemp(),
        linear_feature_columns=linear_features,
        dnn_feature_columns=cont_features,
        dnn_hidden_units=(3, 3))

    metrics = classifier.fit(input_fn=_input_fn, steps=_ITERS).evaluate(
        input_fn=_input_fn, steps=100)
    self._assertSingleClassMetrics(metrics)

  def benchmarkCustomOptimizer(self):
    iris = test_data.prepare_iris_data_for_logistic_regression()
