def _build(self, inputs, prev_state):
    """Connects the ModelRNN module into the graph.

    If this is not the first time the module has been connected to the graph,
    the Tensors provided as input_ and state must have the same final
    dimension, in order for the existing variables to be the correct size for
    their corresponding multiplications. The batch size may differ for each
    connection.

    Args:
      inputs: Tensor input to the ModelRNN (ignored).
      prev_state: Tensor of size `model.output_size`.

    Returns:
      output: Tensor of size `model.output_size`.
      next_state: Tensor of size `model.output_size`.
    """
    next_state = self._model(prev_state)

    # For ModelRNN, the next state of the RNN is the same as the output
    return next_state, next_state
Connects the ModelRNN module into the graph.

    If this is not the first time the module has been connected to the graph,
    the Tensors provided as input_ and state must have the same final
    dimension, in order for the existing variables to be the correct size for
    their corresponding multiplications. The batch size may differ for each
    connection.

    Args:
      inputs: Tensor input to the ModelRNN (ignored).
      prev_state: Tensor of size `model.output_size`.

    Returns:
      output: Tensor of size `model.output_size`.
      next_state: Tensor of size `model.output_size`.