title: How to use tensorflow feature_columns as input to a keras model
body: <p>Tensorflow's <a href="https://www.tensorflow.org/guide/feature_columns" rel="noreferrer">feature_columns API</a> is quite useful for non-numerical feature processing. However, the current API doc is more about using feature_columns with tensorflow Estimator. Is there a possible way to use feature_columns for categorical features representation and then build a model based on tf.keras?</p>
  
  <p>The only reference I found is the following tutorial. It shows how to feed feature columns to a Keras Sequential model: <a href="https://github.com/tensorflow/docs/blob/b4d8d7096099c2b0a7df6a0564bf6eca8c96c4a0/site/en/tutorials/structured_data/feature_cols_keras.ipynb" rel="noreferrer">Link</a></p>
  
  <p>The code snippet is as follows:</p>
  
  <pre><code>from tensorflow.python.feature_column import feature_column_v2 as fc
  
  feature_columns = [fc.embedding_column(ccv, dimension=3), ...]
  feature_layer = fc.FeatureLayer(feature_columns)
  model = tf.keras.Sequential([
      feature_layer,
      tf.keras.layers.Dense(128, activation=tf.nn.relu),
      tf.keras.layers.Dense(64, activation=tf.nn.relu),
      tf.keras.layers.Dense(1, activation=tf.nn.sigmoid)
  ])
  ...
  model.fit(dataset, steps_per_epoch=8) # dataset is created from tensorflow Dataset API
  </code></pre>
  
  <p>The question is how to use a customed model with keras functional model API. I tried the following, but it did not work (tensorflow version 1.12)</p>
  
  <pre><code>feature_layer = fc.FeatureLayer(feature_columns)
  dense_features = feature_layer(features) # features is a dict of ndarrays in dataset
  layer1 = tf.keras.layers.Dense(128, activation=tf.nn.relu)(dense_features)
  layer2 = tf.keras.layers.Dense(64, activation=tf.nn.relu)(layer1)
  output = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid)(layer2)
  model = Model(inputs=dense_features, outputs=output)
  </code></pre>
  
  <p>The error log: </p>
  
  <pre><code>ValueError: Input tensors to a Model must come from `tf.layers.Input`. Received: Tensor("feature_layer/concat:0", shape=(4, 3), dtype=float32) (missing previous layer metadata).
  </code></pre>
  
  <p>I don't kown how to transform feature columns to keras model's input.</p>