title: Runtime error while trying basic tensorflow code
body: <p>Update:</p>
  
  <p>Whether it is a word, sentence or phrase, The Universal Sentence Encoder will always return vector size of 512. I will like to know <strong>why 512</strong> and not something else.</p>
  
  <hr>
  
  <p>The following question was resolved by the answer provided.</p>
  
  <p>I tried the example provided on tensorflow home page:</p>
  
  <p><a href="https://tfhub.dev/google/universal-sentence-encoder/2" rel="nofollow noreferrer">https://tfhub.dev/google/universal-sentence-encoder/2</a></p>
  
  <p>I got runtime error like this:</p>
  
  <blockquote>
    <p>RuntimeError: Exporting/importing meta graphs is not supported when
    eager execution is enabled. No graph exists when eager execution is
    enabled.</p>
  </blockquote>
  
  <p>The code that I tried is:</p>
  
  <pre><code>import tensorflow.compat.v1 as tf
  import tensorflow_hub as hub
  
  config = tf.ConfigProto()
  session = tf.Session(config=config)
  
  embed = hub.Module("https://tfhub.dev/google/universal-sentence-encoder/2")
  embeddings = embed(
      [
          "The quick brown fox jumps over the lazy dog.",
          "I am a sentence for which I would like to get its embedding",
      ]
  )
  
  print(session.run(embeddings))
  </code></pre>
  
  <p>How to run this code correctly?</p>