title: Tensorflow Embedding Layer Vocabulary Size
body: <p>I am learning Tensorflow and have come across the Embedding layer in tensorflow used to learn one's own word embeddings. The layer takes the following parameters:</p>
  
  <pre><code>keras.layers.Embedding(input_dim, 
                         output_dim, 
                         embeddings_initializer='uniform',
                         embeddings_regularizer=None, 
                         activity_regularizer=None, 
                         embeddings_constraint=None, 
                         mask_zero=False, 
                         input_length=None)
  </code></pre>
  
  <p>The 'input dim' should be the same size as the vocabulary i.e. unique words. If I wanted to limit the vocabulary to only the first 25000 most frequent words - how should I do this? </p>
  
  <p>Can I simply change 'input_dim' to 25000 or would I have to go through my corpus and replace any word that is outside the top 25000 words with an  token for example?</p>