parameters: (inputs, shape, **kwargs)
return_statement: return output
docstring: Reshape the dimensions of input.
  
      Parameters
      ----------
      inputs : Tensor
          The input tensor.
      shape : list or tuple
          The new shape.
  
      Returns
      -------
      Tensor
          The output tensor.
  
      Examples
      --------
      >>> a = Tensor(shape=[1, 2, 3, 4]).Variable()
      >>> print Reshape(a, shape=[6, 4])
      >>> [6, 4]
  
      >>> b = Reshape(a, shape=[-1, 4]) # shape will be [6, 4] in the backend
      >>> print b.shape
      >>> [1, 4] # fake dimension at axis 0
docstring_summary: Reshape the dimensions of input.
docstring_tokens: Reshape the dimensions of input .
function: def Reshape(inputs, shape, **kwargs):
      """Reshape the dimensions of input.
  
      Parameters
      ----------
      inputs : Tensor
          The input tensor.
      shape : list or tuple
          The new shape.
  
      Returns
      -------
      Tensor
          The output tensor.
  
      Examples
      --------
      >>> a = Tensor(shape=[1, 2, 3, 4]).Variable()
      >>> print Reshape(a, shape=[6, 4])
      >>> [6, 4]
  
      >>> b = Reshape(a, shape=[-1, 4]) # shape will be [6, 4] in the backend
      >>> print b.shape
      >>> [1, 4] # fake dimension at axis 0
  
      """
      CheckInputs(inputs, 1)
      arguments = ParseArguments(locals())
  
      if not isinstance(shape, tuple) and not isinstance(shape, list):
          raise TypeError('The type of dims must be a tuple or list.')
  
      output = Tensor.CreateOperator(nout=1, op_type='Reshape', **arguments)
  
      if inputs.shape is not None:
          output.shape = [1] * len(shape)
          for i, s in enumerate(shape):
              if s == -1: output.shape[i] = 1
              elif s == 0: output.shape[i] = inputs.shape[i]
              else: output.shape[i] = s
  
      return output
function_tokens: def Reshape ( inputs , shape , * * kwargs ) : CheckInputs ( inputs , 1 ) arguments = ParseArguments ( locals ( ) ) if not isinstance ( shape , tuple ) and not isinstance ( shape , list ) : raise TypeError ( 'The type of dims must be a tuple or list.' ) output = Tensor . CreateOperator ( nout = 1 , op_type = 'Reshape' , * * arguments ) if inputs . shape is not None : output . shape = [ 1 ] * len ( shape ) for i , s in enumerate ( shape ) : if s == - 1 : output . shape [ i ] = 1 elif s == 0 : output . shape [ i ] = inputs . shape [ i ] else : output . shape [ i ] = s return output