class_docstr: A simple embedding lookup encoder.
class_docstr_tok: ["A","simple","embedding","lookup","encoder","."]
code: def __init__(
      self,
      emb_dim,
      is_train,
      train_dropout=1.0,
      input_dim=None,
      embeddings=None,
      scope="embeddings",
      use_tanh=False,
      num_ps_tasks=None,
  ):
      super(EmbeddingLookup, self).__init__()
      self.emb_dim = emb_dim
      self.is_train = is_train
      self.dropout = train_dropout
      self.use_tanh = use_tanh
      with tf.variable_scope(scope):
          if embeddings:
              self.embeddings = embeddings
          else:
              partitioner = None
              if num_ps_tasks:
                  partitioner = tf.min_max_variable_partitioner(
                      max_partitions=num_ps_tasks
                  )
              self.embeddings = tf.get_variable(
                  "embeddings",
                  shape=(input_dim, self.emb_dim),
                  initializer=tf.glorot_uniform_initializer(),
                  partitioner=partitioner,
              )
      if not embeddings:
          utils.add_variable_summaries(self.embeddings, scope)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  import utils
label_desc: Use image node_id 1 to create a new EmbeddingLookup object from inherited base classes: Encoder with example: obj = EmbeddingLookup(emb_dim, is_train, train_dropout, input_dim, embeddings, scope, use_tanh, num_ps_tasks)