parameters: (input, index, updates, name=None)
return_statement: return out
docstring: :api_attr: Static Graph
  
      **Note**:
      
      **The index and updates parameters of the OP must be LoDTensor.**
       
      Plus the updates data to the corresponding input according to the index.
   
      The updated algorithm is as follows: output[instance_index][index [pos]] = input[instance_index][index [pos]] +  updates[pos], 
      where instance_idx is the K sample corresponding to pos in batch.
  
      The value of output[i][j] depends on whether j can be found in the i+1th interval of the index. If found, 
      out[i][j] = input[i][j] + update[m] [n], otherwise, out[i][j] = input[i][j].
  
      For example, in the following example, the lod information for index is divided into three sequences. Among 
      them, because the element 0 can be found in the first interval of the index, it is updated with the value of 
      the corresponding position of the updates, out[0][0] = input[0][0]+updates[0][0] . Because element 1 cannot 
      be found in the third interval of index, out[2][1] = input[2][1].
  
      .. code-block:: text
          
          *Case 1:
  
              Given:
                  input.data = [[1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                                [1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                                [1.0, 1.0, 1.0, 1.0, 1.0, 1.0]]
                                input.dims = [3, 6]
  
                  index.data = [[0], [1], [2], [5], [4], [3], [2], [1], [3], [2], [5], [4]]
                  index.lod =  [[0,        3,                       8,                 12]]
  
                  updates.data = [[0.3], [0.3], [0.4], [0.1], [0.2], [0.3], [0.4], [0.0], [0.2], [0.3], [0.1], [0.4]]
                  updates.lod =  [[  0,            3,                                 8,                         12]]
  
              Then:
                  out.data = [[1.3, 1.3, 1.4, 1.0, 1.0, 1.0],
                              [1.0, 1.0, 1.4, 1.3, 1.2, 1.1],
                              [1.0, 1.0, 1.3, 1.2, 1.4, 1.1]]
                  out.dims = X.dims = [3, 6]
  
      Args:
          input (Variable): A Tensor with shape of  :math:`[N, k_1... k_n]`. Supported data types: float32, float64, int32, int64.
          index (Variable):  A LoDTensor contains index information. Its LoD level must be 1 and its data type can be int32 or int64.
          updates (Variable): A LodTensor contains updates information. It has the same  LoD level with the index and has the 
                              same data type  with the input. Supported data types: float32, float64, int32, int64.
          name (str, optional): The default value is None.  Normally there is no need for user to set this property.  For more information, 
                                please refer to :ref:`api_guide_Name`
  
      Returns:
          Variable: A Tensor which has been updated. It has the same shape and data type with input.
  
      Examples:
  
          .. code-block:: python
  	
              import paddle
              paddle.enable_static()
  
              input = paddle.static.data(name="x", shape=[None, 3, 6], dtype='float32' )
              index = paddle.static.data(name='index', shape=[12, 1],  dtype='int64', lod_level=1)
              updates = paddle.static.data(name='updates', shape=[12, 1], dtype='float32', lod_level=1)
              output = paddle.static.nn.sequence_scatter(input, index, updates)
docstring_summary: :api_attr: Static Graph
docstring_tokens: : api_attr : Static Graph
function: def sequence_scatter(input, index, updates, name=None):
      """
  	:api_attr: Static Graph
  
      **Note**:
      
      **The index and updates parameters of the OP must be LoDTensor.**
       
      Plus the updates data to the corresponding input according to the index.
   
      The updated algorithm is as follows: output[instance_index][index [pos]] = input[instance_index][index [pos]] +  updates[pos], 
      where instance_idx is the K sample corresponding to pos in batch.
  
      The value of output[i][j] depends on whether j can be found in the i+1th interval of the index. If found, 
      out[i][j] = input[i][j] + update[m] [n], otherwise, out[i][j] = input[i][j].
  
      For example, in the following example, the lod information for index is divided into three sequences. Among 
      them, because the element 0 can be found in the first interval of the index, it is updated with the value of 
      the corresponding position of the updates, out[0][0] = input[0][0]+updates[0][0] . Because element 1 cannot 
      be found in the third interval of index, out[2][1] = input[2][1].
  
      .. code-block:: text
          
          *Case 1:
  
              Given:
                  input.data = [[1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                                [1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                                [1.0, 1.0, 1.0, 1.0, 1.0, 1.0]]
                                input.dims = [3, 6]
  
                  index.data = [[0], [1], [2], [5], [4], [3], [2], [1], [3], [2], [5], [4]]
                  index.lod =  [[0,        3,                       8,                 12]]
  
                  updates.data = [[0.3], [0.3], [0.4], [0.1], [0.2], [0.3], [0.4], [0.0], [0.2], [0.3], [0.1], [0.4]]
                  updates.lod =  [[  0,            3,                                 8,                         12]]
  
              Then:
                  out.data = [[1.3, 1.3, 1.4, 1.0, 1.0, 1.0],
                              [1.0, 1.0, 1.4, 1.3, 1.2, 1.1],
                              [1.0, 1.0, 1.3, 1.2, 1.4, 1.1]]
                  out.dims = X.dims = [3, 6]
  
      Args:
          input (Variable): A Tensor with shape of  :math:`[N, k_1... k_n]`. Supported data types: float32, float64, int32, int64.
          index (Variable):  A LoDTensor contains index information. Its LoD level must be 1 and its data type can be int32 or int64.
          updates (Variable): A LodTensor contains updates information. It has the same  LoD level with the index and has the 
                              same data type  with the input. Supported data types: float32, float64, int32, int64.
          name (str, optional): The default value is None.  Normally there is no need for user to set this property.  For more information, 
                                please refer to :ref:`api_guide_Name`
  
      Returns:
          Variable: A Tensor which has been updated. It has the same shape and data type with input.
  
      Examples:
  
          .. code-block:: python
  	
              import paddle
              paddle.enable_static()
  
              input = paddle.static.data(name="x", shape=[None, 3, 6], dtype='float32' )
              index = paddle.static.data(name='index', shape=[12, 1],  dtype='int64', lod_level=1)
              updates = paddle.static.data(name='updates', shape=[12, 1], dtype='float32', lod_level=1)
              output = paddle.static.nn.sequence_scatter(input, index, updates)
  
      """
      assert not in_dygraph_mode(), (
          "sequence layer is not supported in dygraph mode yet.")
      helper = LayerHelper('sequence_scatter', **locals())
  
      check_variable_and_dtype(input, 'input',
                               ['float32', 'float64', 'int32', 'int64'],
                               'sequence_scatter')
      check_variable_and_dtype(index, 'index', ['int32', 'int64'],
                               'sequence_scatter')
      check_variable_and_dtype(updates, 'updates',
                               ['float32', 'float64', 'int32', 'int64'],
                               'sequence_scatter')
  
      dtype = helper.input_dtype()
      out = helper.create_variable_for_type_inference(dtype)
      helper.append_op(
          type="sequence_scatter",
          inputs={"X": input,
                  "Ids": index,
                  "Updates": updates},
          outputs={"Out": out})
      return out
function_tokens: def sequence_scatter ( input , index , updates , name = None ) : assert not in_dygraph_mode ( ) , ( "sequence layer is not supported in dygraph mode yet." ) helper = LayerHelper ( 'sequence_scatter' , * * locals ( ) ) check_variable_and_dtype ( input , 'input' , [ 'float32' , 'float64' , 'int32' , 'int64' ] , 'sequence_scatter' ) check_variable_and_dtype ( index , 'index' , [ 'int32' , 'int64' ] , 'sequence_scatter' ) check_variable_and_dtype ( updates , 'updates' , [ 'float32' , 'float64' , 'int32' , 'int64' ] , 'sequence_scatter' ) dtype = helper . input_dtype ( ) out = helper . create_variable_for_type_inference ( dtype ) helper . append_op ( type = "sequence_scatter" , inputs = { "X" : input , "Ids" : index , "Updates" : updates } , outputs = { "Out" : out } ) return out