parameters: (self, x)
return_statement: return nn.reshape(x, shape=[-1, self.beam_size] + list(x.shape[1:]))
docstring: r"""
          Reshape a tensor with shape `[batch_size * beam_size, ...]` to a new
          tensor with shape `[batch_size, beam_size, ...]`. 
  
          Parameters:
              x(Variable): A tensor with shape `[batch_size * beam_size, ...]`. The
                  data type should be float32, float64, int32, int64 or bool.
  
          Returns:
              Variable: A tensor with shape `[batch_size, beam_size, ...]`, whose \
                  data type is same as `x`.
docstring_summary: r"""
          Reshape a tensor with shape `[batch_size * beam_size, ...]` to a new
          tensor with shape `[batch_size, beam_size, ...]`.
docstring_tokens: r Reshape a tensor with shape [ batch_size * beam_size ... ] to a new tensor with shape [ batch_size beam_size ... ] .
function: def _split_batch_beams(self, x):
          r"""
          Reshape a tensor with shape `[batch_size * beam_size, ...]` to a new
          tensor with shape `[batch_size, beam_size, ...]`. 
  
          Parameters:
              x(Variable): A tensor with shape `[batch_size * beam_size, ...]`. The
                  data type should be float32, float64, int32, int64 or bool.
  
          Returns:
              Variable: A tensor with shape `[batch_size, beam_size, ...]`, whose \
                  data type is same as `x`.     
          """
          check_type(x, 'x', (Variable), 'BeamSearchDecoder._split_batch_beams')
          # TODO: avoid fake shape in compile-time like tile_beam_merge_with_batch
          return nn.reshape(x, shape=[-1, self.beam_size] + list(x.shape[1:]))
function_tokens: def _split_batch_beams ( self , x ) : check_type ( x , 'x' , ( Variable ) , 'BeamSearchDecoder._split_batch_beams' ) # TODO: avoid fake shape in compile-time like tile_beam_merge_with_batch return nn . reshape ( x , shape = [ - 1 , self . beam_size ] + list ( x . shape [ 1 : ] ) )