class_docstr: Simple position embedder that maps position indexes into embeddings
  via lookup.
  
  Either :attr:`init_value` or :attr:`position_size` is required. If both are
  given, there must be ``init_value.shape[0]==position_size``.
  
  Args:
      init_value (optional): A Tensor or numpy array that contains the
          initial value of embeddings. It is typically of shape
          ``[position_size, embedding dim]``
  
          If `None`, embedding is initialized as specified in
          ``hparams["initializer"]``. Otherwise, the
          ``"initializer"`` and ``"dim"``
          hyperparameters in :attr:`hparams` are ignored.
      position_size (int, optional): The number of possible positions, e.g.,
          the maximum sequence length. Required if :attr:`init_value` is
          not given.
      hparams (dict, optional): Embedder hyperparameters. If it is not
          specified, the default hyperparameter setting is used. See
          :attr:`default_hparams` for the structure and default values.
  
  
  .. document private functions
  .. automethod:: _build
class_docstr_tok: ["Simple","position","embedder","that","maps","position","indexes","into","embeddings","via","lookup",".","Either",":","attr",":","`","init_value","`","or",":","attr",":","`","position_size","`","is","required",".","If","both","are","given",",","there","must","be","``","init_value.shape","[","0","]","==position_size","``",".","Args",":","init_value","(","optional",")",":","A","Tensor","or","numpy","array","that","contains","the","initial","value","of","embeddings",".","It","is","typically","of","shape","``","[","position_size",",","embedding","dim","]","``","If","`","None","`",",","embedding","is","initialized","as","specified","in","``","hparams","[","``","initializer","''","]","``",".","Otherwise",",","the","``","``","initializer","''","``","and","``","``","dim","''","``","hyperparameters","in",":","attr",":","`","hparams","`","are","ignored",".","position_size","(","int",",","optional",")",":","The","number","of","possible","positions",",","e.g.",",","the","maximum","sequence","length",".","Required","if",":","attr",":","`","init_value","`","is","not","given",".","hparams","(","dict",",","optional",")",":","Embedder","hyperparameters",".","If","it","is","not","specified",",","the","default","hyperparameter","setting","is","used",".","See",":","attr",":","`","default_hparams","`","for","the","structure","and","default","values",".","..","document","private","functions","..","automethod",":",":","_build"]
docstr: The embedding tensor.
          
docstr_tok: ["The","embedding","tensor","."]
code: def embedding(self):
      r"""The embedding tensor."""
      return self._embedding
  
imports: import math
  import tensorflow
  from texar.tf.modules.embedders.embedder_base import EmbedderBase
  from texar.tf.modules.embedders import embedder_utils
  from texar.tf.utils.mode import is_train_mode
  from texar.tf.utils.shapes import mask_sequences
  from texar.tf.utils.shapes import shape_list
label_desc: Use image node_id 4 for calling the PositionEmbedder obj's underlying member method code with example usage: obj.embedding() and returns: self