title: How to use embedding layer and other feature columns together in a network using tensorflow keras
body: <p>Let’s consider a example data set contains 6 columns and 10 rows. </p>
  
  <p>In these 3 columns are numeric and remaining 3 columns are categorical variable.</p>
  
  <p>categorical columns are converted into multi hot encoded array of size 10x3. </p>
  
  <p>I have target columns which i want predict is also categorical variable which can take 3 possible values again. This column is one hot encoded. </p>
  
  <p>Now I want to use this multi-hot-encoded array as input to embedding layer. Embedding layer should output 2 units. </p>
  
  <p>Then I want to use 3 numeric columns from the dataset and 2 output units from the embedding layer total 5 unit as input to the hidden layer. </p>
  
  <p>This is the place I got stuck up. I don’t know how to bridge embedding layer and my other feature columns using tensorflow keras, also I don’t know how to pass input for embedding layer and other 2 units.   </p>
  
  <p>I have googled it. I tried the following code but still I get error. 
  <strong>I guess there is no Merge layer in tf.keras package</strong>. </p>
  
  <p>Any help on this would be greatly appreciated. </p>
  
  <pre><code>        import tensorflow as tf
          from tensorflow import keras
          import numpy as np
  
          num_data = np.random.random(size=(10,3))
          multi_hot_encode_data = np.random.randint(0,2, 30).reshape(10,3)
          target =  np.eye(3)[np.random.randint(0,3, 10)]
  
          model = keras.Sequential()
          model.add(keras.layers.Embedding(input_dim=multi_hot_encode_data.shape[1], output_dim=2))
          model.add(keras.layers.Dense(3, activation=tf.nn.relu, input_shape=(num_data.shape[1],)))
          model.add(keras.layers.Dense(3, activation=tf.nn.softmax)
  
          model.compile(optimizer=tf.train.RMSPropOptimizer(0.01),
                        loss=keras.losses.categorical_crossentropy,
                        metrics=[keras.metrics.categorical_accuracy])
  
          #model.fit([multi_hot_encode_data, num_data], target)   # I get error here 
  </code></pre>
  
  <p>My network structure will be </p>
  
  <pre><code>    multi-hot-encode-input  num_data_input 
              |                   |
              |                   |
              |                   |
          embedding_layer         |
              |                   |
              |                   | 
               \                 /        
                 \              / 
                dense_hidden_layer
                       | 
                       | 
                    output_layer 
  </code></pre>