title: ELMO embedding start session
body: <p>I have an error when I apply the Elmo embedding to my data. I have 7255 sentences.</p>
  
  <pre><code>embeddings = embed(
      sentences,
      signature="default",
      as_dict=True)['default']
  
  #Start a session and run ELMo to return the embeddings in variable x
  with tf.Session() as sess:
    sess.run(tf.global_variables_initializer())
    sess.run(tf.tables_initializer())
    x = sess.run(embeddings)
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>ResourceExhaustedError: OOM when allocating tensor with shape[36021075,50] and type int32 on /job:localhost/replica:0/task:0/device:CPU:0 by allocator cpu
         [[node module_apply_default/map/TensorArrayStack/TensorArrayGatherV3 (defined at C:\Users...\envs\tf_36\lib\site-packages\tensorflow_hub\native_module.py:547) ]]
    Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.</p>
  </blockquote>