parameters: (self, inputs, state)
return_statement: return m_out, state_out
docstring: Run one step of LSTM.
  
      Args:
        inputs: input Tensor, 2D, [batch, num_units].
        state: tuple of Tensors, 2D, [batch, state_size].
  
      Returns:
        A tuple containing:
        - A 2D, [batch, output_dim], Tensor representing the output of the LSTM
          after reading "inputs" when previous state was "state".
          Here output_dim is num_units.
        - A 2D, [batch, state_size], Tensor representing the new state of LSTM
          after reading "inputs" when previous state was "state".
      Raises:
        ValueError: if an input_size was specified and the provided inputs have
          a different dimension.
docstring_summary: Run one step of LSTM.
docstring_tokens: Run one step of LSTM .
function: def call(self, inputs, state):
      """Run one step of LSTM.
  
      Args:
        inputs: input Tensor, 2D, [batch, num_units].
        state: tuple of Tensors, 2D, [batch, state_size].
  
      Returns:
        A tuple containing:
        - A 2D, [batch, output_dim], Tensor representing the output of the LSTM
          after reading "inputs" when previous state was "state".
          Here output_dim is num_units.
        - A 2D, [batch, state_size], Tensor representing the new state of LSTM
          after reading "inputs" when previous state was "state".
      Raises:
        ValueError: if an input_size was specified and the provided inputs have
          a different dimension.
      """
      batch_size = tensor_shape.dimension_value(
          inputs.shape[0]) or array_ops.shape(inputs)[0]
      fwd_inputs = self._make_tf_features(inputs)
      if self._backward_slice_offset:
        bwd_inputs = self._make_tf_features(inputs, self._backward_slice_offset)
      else:
        bwd_inputs = fwd_inputs
  
      # Forward processing
      with vs.variable_scope("fwd"):
        fwd_m_out_lst = []
        fwd_state_out_lst = []
        for block in range(len(fwd_inputs)):
          fwd_m_out_lst_current, fwd_state_out_lst_current = self._compute(
              fwd_inputs[block],
              block,
              state,
              batch_size,
              state_prefix="fwd_state",
              state_is_tuple=True)
          fwd_m_out_lst.extend(fwd_m_out_lst_current)
          fwd_state_out_lst.extend(fwd_state_out_lst_current)
      # Backward processing
      bwd_m_out_lst = []
      bwd_state_out_lst = []
      with vs.variable_scope("bwd"):
        for block in range(len(bwd_inputs)):
          # Reverse the blocks
          bwd_inputs_reverse = bwd_inputs[block][::-1]
          bwd_m_out_lst_current, bwd_state_out_lst_current = self._compute(
              bwd_inputs_reverse,
              block,
              state,
              batch_size,
              state_prefix="bwd_state",
              state_is_tuple=True)
          bwd_m_out_lst.extend(bwd_m_out_lst_current)
          bwd_state_out_lst.extend(bwd_state_out_lst_current)
      state_out = self._state_tuple_type(*(fwd_state_out_lst + bwd_state_out_lst))
      # Outputs are always concated as it is never used separately.
      m_out = array_ops.concat(fwd_m_out_lst + bwd_m_out_lst, 1)
      return m_out, state_out
function_tokens: def call ( self , inputs , state ) : batch_size = tensor_shape . dimension_value ( inputs . shape [ 0 ] ) or array_ops . shape ( inputs ) [ 0 ] fwd_inputs = self . _make_tf_features ( inputs ) if self . _backward_slice_offset : bwd_inputs = self . _make_tf_features ( inputs , self . _backward_slice_offset ) else : bwd_inputs = fwd_inputs # Forward processing with vs . variable_scope ( "fwd" ) : fwd_m_out_lst = [ ] fwd_state_out_lst = [ ] for block in range ( len ( fwd_inputs ) ) : fwd_m_out_lst_current , fwd_state_out_lst_current = self . _compute ( fwd_inputs [ block ] , block , state , batch_size , state_prefix = "fwd_state" , state_is_tuple = True ) fwd_m_out_lst . extend ( fwd_m_out_lst_current ) fwd_state_out_lst . extend ( fwd_state_out_lst_current ) # Backward processing bwd_m_out_lst = [ ] bwd_state_out_lst = [ ] with vs . variable_scope ( "bwd" ) : for block in range ( len ( bwd_inputs ) ) : # Reverse the blocks bwd_inputs_reverse = bwd_inputs [ block ] [ : : - 1 ] bwd_m_out_lst_current , bwd_state_out_lst_current = self . _compute ( bwd_inputs_reverse , block , state , batch_size , state_prefix = "bwd_state" , state_is_tuple = True ) bwd_m_out_lst . extend ( bwd_m_out_lst_current ) bwd_state_out_lst . extend ( bwd_state_out_lst_current ) state_out = self . _state_tuple_type ( * ( fwd_state_out_lst + bwd_state_out_lst ) ) # Outputs are always concated as it is never used separately. m_out = array_ops . concat ( fwd_m_out_lst + bwd_m_out_lst , 1 ) return m_out , state_out