class_docstr: Creates a constant Tensor or (nested) tuple of Tensors that
  contains a constant value.
  
  Args:
      output_size: Size of output **excluding** the batch dimension. For
          example, set `output_size` to `dim` to generate output of
          shape `[batch_size, dim]`.
          Can be an `int`, a tuple of `int`, a Tensorshape, or a tuple of
          TensorShapes.
          For example, to transform inputs to have decoder state size, set
          `output_size=decoder.state_size`.
      hparams (dict, optional): Hyperparameters. Missing
          hyperparamerter will be set to default values. See
          :meth:`default_hparams` for the hyperparameter sturcture and
          default values.
  
  This connector does not have trainable parameters.
  See :meth:`_build` for the inputs and outputs of the connector.
  
  Example:
  
      .. code-block:: python
  
          connector = Connector(cell.state_size)
          zero_state = connector(batch_size=64, value=0.)
          one_state = connector(batch_size=64, value=1.)
  
  .. document private functions
  .. automethod:: _build
class_docstr_tok: ["Creates","a","constant","Tensor","or","(","nested",")","tuple","of","Tensors","that","contains","a","constant","value",".","Args",":","output_size",":","Size","of","output","*","*","excluding","*","*","the","batch","dimension",".","For","example",",","set","`","output_size","`","to","`","dim","`","to","generate","output","of","shape","`","[","batch_size",",","dim","]","`",".","Can","be","an","`","int","`",",","a","tuple","of","`","int","`",",","a","Tensorshape",",","or","a","tuple","of","TensorShapes",".","For","example",",","to","transform","inputs","to","have","decoder","state","size",",","set","`","output_size=decoder.state_size","`",".","hparams","(","dict",",","optional",")",":","Hyperparameters",".","Missing","hyperparamerter","will","be","set","to","default","values",".","See",":","meth",":","`","default_hparams","`","for","the","hyperparameter","sturcture","and","default","values",".","This","connector","does","not","have","trainable","parameters",".","See",":","meth",":","`","_build","`","for","the","inputs","and","outputs","of","the","connector",".","Example",":","..","code-block",":",":","python","connector","=","Connector","(","cell.state_size",")","zero_state","=","connector","(","batch_size=64",",","value=0",".",")","one_state","=","connector","(","batch_size=64",",","value=1",".",")","..","document","private","functions","..","automethod",":",":","_build"]
code: def __init__(self, output_size, hparams=None):
      ConnectorBase.__init__(self, output_size, hparams)
  
imports: import numpy
  import tensorflow
  from tensorflow import distributions
  from tensorflow.python.util import nest
  from texar.tf.modules.connectors.connector_base import ConnectorBase
  from texar.tf.core import layers
  from texar.tf.utils.utils import get_function, check_or_get_instance
label_desc: Use image node_id 1 to create a new ConstantConnector object from inherited base classes: ConnectorBase with example: obj = ConstantConnector(output_size, hparams)