parameters: (self, t, s=None)
return_statement: return reshaped_t
docstring: Merges the tensor from a batch of beams into a batch by beams.
  
      More exactly, t is a tensor of dimension [batch_size, beam_width, s]. We
      reshape this into [batch_size*beam_width, s]
  
      Args:
        t: Tensor of dimension [batch_size, beam_width, s]
        s: (Possibly known) depth shape.
  
      Returns:
        A reshaped version of t with dimension [batch_size * beam_width, s].
docstring_summary: Merges the tensor from a batch of beams into a batch by beams.
docstring_tokens: Merges the tensor from a batch of beams into a batch by beams .
function: def _merge_batch_beams(self, t, s=None):
      """Merges the tensor from a batch of beams into a batch by beams.
  
      More exactly, t is a tensor of dimension [batch_size, beam_width, s]. We
      reshape this into [batch_size*beam_width, s]
  
      Args:
        t: Tensor of dimension [batch_size, beam_width, s]
        s: (Possibly known) depth shape.
  
      Returns:
        A reshaped version of t with dimension [batch_size * beam_width, s].
      """
      if isinstance(s, ops.Tensor):
        s = tensor_shape.as_shape(tensor_util.constant_value(s))
      else:
        s = tensor_shape.TensorShape(s)
      t_shape = array_ops.shape(t)
      static_batch_size = tensor_util.constant_value(self._batch_size)
      batch_size_beam_width = (
          None if static_batch_size is None
          else static_batch_size * self._beam_width)
      reshaped_t = array_ops.reshape(
          t, array_ops.concat(
              ([self._batch_size * self._beam_width], t_shape[2:]), 0))
      reshaped_t.set_shape(
          (tensor_shape.TensorShape([batch_size_beam_width]).concatenate(s)))
      return reshaped_t
function_tokens: def _merge_batch_beams ( self , t , s = None ) : if isinstance ( s , ops . Tensor ) : s = tensor_shape . as_shape ( tensor_util . constant_value ( s ) ) else : s = tensor_shape . TensorShape ( s ) t_shape = array_ops . shape ( t ) static_batch_size = tensor_util . constant_value ( self . _batch_size ) batch_size_beam_width = ( None if static_batch_size is None else static_batch_size * self . _beam_width ) reshaped_t = array_ops . reshape ( t , array_ops . concat ( ( [ self . _batch_size * self . _beam_width ] , t_shape [ 2 : ] ) , 0 ) ) reshaped_t . set_shape ( ( tensor_shape . TensorShape ( [ batch_size_beam_width ] ) . concatenate ( s ) ) ) return reshaped_t