code: def __init__(self):
      try:
          import tensorflow as tf
          import tensorflow_hub as hub
      except (AttributeError, ImportError):
          logger.error(
              "tensorflow_hub is not installed, "
              + "please install nlp_architect with [all] package. "
              + "for example: pip install nlp_architect[all]"
          )
          sys.exit()
  
      self.g = tf.Graph()
  
      with self.g.as_default():
          text_input = tf.compat.v1.placeholder(dtype=tf.string)
          text_input_size = tf.compat.v1.placeholder(dtype=tf.int32)
          print(
              "Loading Tensorflow hub ELMo model, "
              "might take a while on first load (model is downloaded from web)"
          )
          self.elmo = hub.Module(
              "https://tfhub.dev/google/elmo/3", trainable=False
          )
          self.inputs = {
              "tokens": text_input,
              "sequence_len": text_input_size,
          }
          self.embedding = self.elmo(
              inputs=self.inputs, signature="tokens", as_dict=True
          )["elmo"]
  
          sess = tf.compat.v1.Session(graph=self.g)
          sess.run(tf.compat.v1.global_variables_initializer())
          sess.run(tf.compat.v1.tables_initializer())
          self.s = sess
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import os
  import sys
  from typing import List
  import numpy
  from gensim.models import FastText
  from nlp_architect.utils.text import Vocabulary
label_desc: Use image node_id 1 to create a new ELMoEmbedderTFHUB object from inherited base classes: object with example: obj = ELMoEmbedderTFHUB()