class_docstr: Base class inherited by modules that create Variables and are
  configurable through hyperparameters.
  
  A Texar module inheriting :class:`~texar.tf.ModuleBase` has following key
  features:
  
      - **Convenient variable re-use**: A module instance creates         its own sets of variables, and automatically re-uses its variables on         subsequent calls. Hence TF variable/name scope is         transparent to users. For example:
  
          .. code-block:: python
  
              encoder = UnidirectionalRNNEncoder(hparams) # create instance
              output_1 = encoder(inputs_1) # variables are created
              output_2 = encoder(inputs_2) # variables are re-used
  
              print(encoder.trainable_variables) # access trainable variables
              # [ ... ]
  
      - **Configurable through hyperparameters**: Each module defines         allowed hyperparameters and default values. Hyperparameters not         specified by users will take default values.
  
      - **Callable**: As the above example, a module instance is "called"         with input tensors and returns output tensors. Every call of a module         will add ops to the Graph to perform the module's logic.
  
  Args:
      hparams (dict, optional): Hyperparameters of the module. See
          :meth:`default_hparams` for the structure and default values.
  
  
  .. document private functions
  .. automethod:: _build
docstr: Executes the module logic defined in _build method
  
  Args:
      *args: Arguments of _build method.
      **kwargs: Keyword arguments of _build method.
  
  Returns:
      The output of _build method.
docstr_tok: ["Executes","the","module","logic","defined","in","_build","method","Args",":","*","args",":","Arguments","of","_build","method",".","*","*","kwargs",":","Keyword","arguments","of","_build","method",".","Returns",":","The","output","of","_build","method","."]
code: def __call__(self, *args, **kwargs):
      """Executes the module logic defined in _build method
  
      Args:
          *args: Arguments of _build method.
          **kwargs: Keyword arguments of _build method.
  
      Returns:
          The output of _build method.
      """
      return self._template(*args, **kwargs)
  
file_path: texar/texar/tf/module_base.py
imports: import re
  import tensorflow
  from texar.tf.utils.exceptions import TexarError
  from texar.tf.hyperparams import HParams
label_desc: Use image node_id 4 for calling the ModuleBase obj's underlying member method code with example usage: obj.__call__() and returns: self