title: tf.nn.embedding_lookup with float input?
body: <p>I would like to implement an embedding table with float inputs instead of int32 or 64b.
  The reason is that instead of words like in a simple RNN, I would like to use percentages.
  For example in case of a recipe; I may have 1000 or 3000 ingredients; but in every recipe I may have a maximum of 80.
  The ingredients will be represented in percentage for example: ingredient1=0.2 ingredient2=0.8... etc</p>
  
  <p>my problem is that tensorflow forces me to use integers for my embedding table:</p>
  
  <blockquote>
    <p><strong>TypeError</strong>: Value passed to parameter ‘indices’ has DataType float32 not in list of allowed values: int32, int64</p>
  </blockquote>
  
  <p>any suggestion?
  I appreciate your feedback,</p>
  
  <p>example of embedding look up: </p>
  
  <pre><code>inputs = tf.placeholder(tf.float32, shape=[None, ninp], name=“x”)
  n_vocab = len(int_to_vocab)
  n_embedding = 200 # Number of embedding features 
  with train_graph.as_default():
      embedding = tf.Variable(tf.random_uniform((n_vocab, n_embedding), -1, 1))
      embed = tf.nn.embedding_lookup(embedding, inputs)
  </code></pre>
  
  <p>the error is caused by </p>
  
  <pre><code>inputs = tf.placeholder(**tf.float32,** shape=[None, ninp], name=“x”)
  </code></pre>
  
  <p>I have thought of an algorithm that could work using loops. But, I was wondering if there is a more direct solution. </p>
  
  <p>Thanks! </p>