parameters: (self, length, inputs, begin_state=None, layout='NTC', merge_outputs=None)
return_statement: return outputs, states
docstring: Unrolls an RNN cell across time steps.
  
          Parameters
          ----------
          length : int
              Number of steps to unroll.
          inputs : Symbol, list of Symbol, or None
              If `inputs` is a single Symbol (usually the output
              of Embedding symbol), it should have shape
              (batch_size, length, ...) if `layout` is 'NTC',
              or (length, batch_size, ...) if `layout` is 'TNC'.
  
              If `inputs` is a list of symbols (usually output of
              previous unroll), they should all have shape
              (batch_size, ...).
          begin_state : nested list of Symbol, optional
              Input states created by `begin_state()`
              or output state of another cell.
              Created from `begin_state()` if `None`.
          layout : str, optional
              `layout` of input symbol. Only used if inputs
              is a single Symbol.
          merge_outputs : bool, optional
              If `False`, returns outputs as a list of Symbols.
              If `True`, concatenates output across time steps
              and returns a single symbol with shape
              (batch_size, length, ...) if layout is 'NTC',
              or (length, batch_size, ...) if layout is 'TNC'.
              If `None`, output whatever is faster.
  
          Returns
          -------
          outputs : list of Symbol or Symbol
              Symbol (if `merge_outputs` is True) or list of Symbols
              (if `merge_outputs` is False) corresponding to the output from
              the RNN from this unrolling.
  
          states : list of Symbol
              The new state of this RNN after this unrolling.
              The type of this symbol is same as the output of `begin_state()`.
docstring_summary: Unrolls an RNN cell across time steps.
docstring_tokens: Unrolls an RNN cell across time steps .
function: def unroll(self, length, inputs, begin_state=None, layout='NTC', merge_outputs=None):
          """Unrolls an RNN cell across time steps.
  
          Parameters
          ----------
          length : int
              Number of steps to unroll.
          inputs : Symbol, list of Symbol, or None
              If `inputs` is a single Symbol (usually the output
              of Embedding symbol), it should have shape
              (batch_size, length, ...) if `layout` is 'NTC',
              or (length, batch_size, ...) if `layout` is 'TNC'.
  
              If `inputs` is a list of symbols (usually output of
              previous unroll), they should all have shape
              (batch_size, ...).
          begin_state : nested list of Symbol, optional
              Input states created by `begin_state()`
              or output state of another cell.
              Created from `begin_state()` if `None`.
          layout : str, optional
              `layout` of input symbol. Only used if inputs
              is a single Symbol.
          merge_outputs : bool, optional
              If `False`, returns outputs as a list of Symbols.
              If `True`, concatenates output across time steps
              and returns a single symbol with shape
              (batch_size, length, ...) if layout is 'NTC',
              or (length, batch_size, ...) if layout is 'TNC'.
              If `None`, output whatever is faster.
  
          Returns
          -------
          outputs : list of Symbol or Symbol
              Symbol (if `merge_outputs` is True) or list of Symbols
              (if `merge_outputs` is False) corresponding to the output from
              the RNN from this unrolling.
  
          states : list of Symbol
              The new state of this RNN after this unrolling.
              The type of this symbol is same as the output of `begin_state()`.
          """
  
          # Dropout on inputs and outputs can be performed on the whole sequence
          # only when state dropout is not present.
          if self.drop_states:
              return super(VariationalDropoutCell, self).unroll(length, inputs, begin_state,
                                                                layout, merge_outputs)
  
          self.reset()
  
          inputs, axis, F, batch_size = _format_sequence(length, inputs, layout, True)
          states = _get_begin_state(self, F, begin_state, inputs, batch_size)
  
          if self.drop_inputs:
              first_input = inputs.slice_axis(axis, 0, 1).split(1, axis=axis, squeeze_axis=True)
              self._initialize_input_masks(F, first_input, states)
              inputs = F.broadcast_mul(inputs, self.drop_inputs_mask.expand_dims(axis=axis))
  
          outputs, states = self.base_cell.unroll(length, inputs, states, layout, merge_outputs=True)
          if self.drop_outputs:
              first_output = outputs.slice_axis(axis, 0, 1).split(1, axis=axis, squeeze_axis=True)
              self._initialize_output_mask(F, first_output)
              outputs = F.broadcast_mul(outputs, self.drop_outputs_mask.expand_dims(axis=axis))
  
          outputs, _, _, _ = _format_sequence(length, outputs, layout, merge_outputs)
  
          return outputs, states
function_tokens: def unroll ( self , length , inputs , begin_state = None , layout = 'NTC' , merge_outputs = None ) : # Dropout on inputs and outputs can be performed on the whole sequence # only when state dropout is not present. if self . drop_states : return super ( VariationalDropoutCell , self ) . unroll ( length , inputs , begin_state , layout , merge_outputs ) self . reset ( ) inputs , axis , F , batch_size = _format_sequence ( length , inputs , layout , True ) states = _get_begin_state ( self , F , begin_state , inputs , batch_size ) if self . drop_inputs : first_input = inputs . slice_axis ( axis , 0 , 1 ) . split ( 1 , axis = axis , squeeze_axis = True ) self . _initialize_input_masks ( F , first_input , states ) inputs = F . broadcast_mul ( inputs , self . drop_inputs_mask . expand_dims ( axis = axis ) ) outputs , states = self . base_cell . unroll ( length , inputs , states , layout , merge_outputs = True ) if self . drop_outputs : first_output = outputs . slice_axis ( axis , 0 , 1 ) . split ( 1 , axis = axis , squeeze_axis = True ) self . _initialize_output_mask ( F , first_output ) outputs = F . broadcast_mul ( outputs , self . drop_outputs_mask . expand_dims ( axis = axis ) ) outputs , _ , _ , _ = _format_sequence ( length , outputs , layout , merge_outputs ) return outputs , states