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: Returns a `dict` of hyperparameters of the module with default
  values. Used to replace the missing values of input `hparams`
  during module construction.
  
  .. code-block:: python
  
      {
          "name": "module"
      }
docstr_tok: ["Returns","a","`","dict","`","of","hyperparameters","of","the","module","with","default","values",".","Used","to","replace","the","missing","values","of","input","`","hparams","`","during","module","construction",".","..","code-block",":",":","python","{","``","name","''",":","``","module","''","}"]
code: def default_hparams():
      """Returns a `dict` of hyperparameters of the module with default
      values. Used to replace the missing values of input `hparams`
      during module construction.
  
      .. code-block:: python
  
          {
              "name": "module"
          }
      """
      return {"name": "module"}
  
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 2 for calling the ModuleBase obj's underlying member method code with example usage: obj.default_hparams() and returns: dict