class_docstr: Transforms inputs with an MLP layer and packs the results into the
  specified structure and size.
  
  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.
  
  See :meth:`_build` for the inputs and outputs of the connector.
  
  The input to the connector can have arbitrary structure and size.
  
  Example:
  
      .. code-block:: python
  
          cell = LSTMCell(num_units=256)
          # cell.state_size == LSTMStateTuple(c=256, h=256)
  
          connector = MLPTransformConnector(cell.state_size)
          inputs = tf.zeros([64, 10])
          output = connector(inputs)
          # output == LSTMStateTuple(c=tensor_of_shape_(64, 256),
          #                          h=tensor_of_shape_(64, 256))
  
      .. code-block:: python
  
          ## Use to connect encoder and decoder with different state size
          encoder = UnidirectionalRNNEncoder(...)
          _, final_state = encoder(inputs=...)
  
          decoder = BasicRNNDecoder(...)
          connector = MLPTransformConnector(decoder.state_size)
  
          _ = decoder(
              initial_state=connector(final_state),
              ...)
  
  .. document private functions
  .. automethod:: _build
class_docstr_tok: ["Transforms","inputs","with","an","MLP","layer","and","packs","the","results","into","the","specified","structure","and","size",".","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",".","See",":","meth",":","`","_build","`","for","the","inputs","and","outputs","of","the","connector",".","The","input","to","the","connector","can","have","arbitrary","structure","and","size",".","Example",":","..","code-block",":",":","python","cell","=","LSTMCell","(","num_units=256",")","#","cell.state_size","==","LSTMStateTuple","(","c=256",",","h=256",")","connector","=","MLPTransformConnector","(","cell.state_size",")","inputs","=","tf.zeros","(","[","64",",","10","]",")","output","=","connector","(","inputs",")","#","output","==","LSTMStateTuple","(","c=tensor_of_shape_","(","64",",","256",")",",","#","h=tensor_of_shape_","(","64",",","256",")",")","..","code-block",":",":","python","#","#","Use","to","connect","encoder","and","decoder","with","different","state","size","encoder","=","UnidirectionalRNNEncoder","(","...",")","_",",","final_state","=","encoder","(","inputs=","...",")","decoder","=","BasicRNNDecoder","(","...",")","connector","=","MLPTransformConnector","(","decoder.state_size",")","_","=","decoder","(","initial_state=connector","(","final_state",")",",","...",")","..","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 MLPTransformConnector object from inherited base classes: ConnectorBase with example: obj = MLPTransformConnector(output_size, hparams)