# tensorflow::ops::AddManySparseToTensorsMap

`#include <sparse_ops.h>`

[Add](https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/add#classtensorflow_1_1ops_1_1_add) an `N`-minibatch `SparseTensor` to a `SparseTensorsMap`, return `N` handles.

## Summary

A `SparseTensor` of rank `R` is represented by three tensors: `sparse_indices`, `sparse_values`, and `sparse_shape`, where

\`\`\`sparse_indices.shape\[1\] == sparse_shape.shape\[0\] == R


      
        An `N`-minibatch of `SparseTensor` objects is represented as a `SparseTensor`
    having a first `sparse_indices` column taking values between `[0, N)`, where
    the minibatch size `N == sparse_shape[0]`.
      
      
        
        The input SparseTensor must have rank R greater than 1, and the first
        dimension is treated as the minibatch dimension.  Elements of the SparseTensor
        must be sorted in increasing order of this first dimension.  The stored
        SparseTensor objects pointed to by each row of the output sparse_handles
        will have rank R-1.



      
      
        
        The SparseTensor values can then be read out as part of a minibatch by passing
        the given keys as vector elements to https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/take-many-sparse-from-tensors-map#classtensorflow_1_1ops_1_1_take_many_sparse_from_tensors_map.  To ensure
        the correct SparseTensorsMap is accessed, ensure that the same
        container and shared_name are passed to that Op.  If no shared_name
        is provided here, instead use the name of the Operation created by calling
        https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/add-many-sparse-to-tensors-map#classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map as the shared_name passed to
        https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/take-many-sparse-from-tensors-map#classtensorflow_1_1ops_1_1_take_many_sparse_from_tensors_map.  Ensure the Operations are colocated.



      
      
        
        Arguments:
        * scope: A https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope object
        * sparse_indices: 2-D.  The indices of the minibatch SparseTensor.
        sparse_indices[:, 0] must be ordered values in [0, N).
        * sparse_values: 1-D.  The `values` of the minibatch `SparseTensor`.
        * sparse_shape: 1-D.  The shape of the minibatch `Spars`eTensor.
        The minibatch size `N == sparse_s`hape[0].



      <br />



      

        

        Optional attributes (see https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/add-many-sparse-to-tensors-map/attrs#structtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1_1_attrs):
        * container: The container name for the `SparseTensorsMap` created by this op.
        * shared_name: The shared name for the SparseTensorsMap created by this op.
        If blank, the new Operation's unique name is used.



      
    <br />



      

        

        Returns:
        * https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output: 1-D.  The handles of the SparseTensor now stored in the
        SparseTensorsMap.  Shape: [N].  



      
    <br />



      
    | ### Constructors and Destructors ||
    |---|---|
    | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/add-many-sparse-to-tensors-map#classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1a74a1831bfd1f27720873c62a4d963e68(const ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input sparse_indices, ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input sparse_values, ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input sparse_shape)` ||
    | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/add-many-sparse-to-tensors-map#classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1a77594a24c914fe60afa8f2fffb2be090(const ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input sparse_indices, ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input sparse_values, ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input sparse_shape, const https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/add-many-sparse-to-tensors-map/attrs#structtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1_1_attrs & attrs)` ||


      
    | ### Public attributes ||
    |---|---|
    | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/add-many-sparse-to-tensors-map#classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1a0f5ef46531573dcf0f5db668d43daa9b` | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation` |
    | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/add-many-sparse-to-tensors-map#classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1ae6a15aa12ca7a7bdeffef3f72e82cbc2` | `::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output` |


      
    | ### Public functions ||
    |---|---|
    | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/add-many-sparse-to-tensors-map#classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1aa2be23efa50022636a98ca3a1901d6f9() const ` | `::tensorflow::Node *` |
    | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/add-many-sparse-to-tensors-map#classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1a2019483d10b34a38eb43056dd01d0a67() const ` | ` `` ` |
    | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/add-many-sparse-to-tensors-map#classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1ab252ad5ffa96d26b5cd0d7a06ca1c45b() const ` | ` `` ` |


      
    | ### Public static functions ||
    |---|---|
    | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/add-many-sparse-to-tensors-map#classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1ab040c34d4a6550b6f7856758403fe341(StringPiece x)` | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/add-many-sparse-to-tensors-map/attrs#structtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1_1_attrs` |
    | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/add-many-sparse-to-tensors-map#classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1a437ebb905e580d3d568136057b214620(StringPiece x)` | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/add-many-sparse-to-tensors-map/attrs#structtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1_1_attrs` |


      
    | ### Structs ||
    |---|---|
    | [tensorflow::ops::AddManySparseToTensorsMap::Attrs](https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/add-many-sparse-to-tensors-map/attrs) | Optional attribute setters for [AddManySparseToTensorsMap](https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/add-many-sparse-to-tensors-map#classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map). |


      
    ## Public attributes


      
        
    ### operation


        
    ```
    Operation operation
    ```

        
      
      
        
    ### sparse_handles


        
    ```
    ::tensorflow::Output sparse_handles
    ```

        
      
      
    ## Public functions


      
        
    ### AddManySparseToTensorsMap


        
    ```
     AddManySparseToTensorsMap(
      const ::tensorflow::Scope & scope,
      ::tensorflow::Input sparse_indices,
      ::tensorflow::Input sparse_values,
      ::tensorflow::Input sparse_shape
    )
    ```

        
      
      
        
    ### AddManySparseToTensorsMap


        
    ```
     AddManySparseToTensorsMap(
      const ::tensorflow::Scope & scope,
      ::tensorflow::Input sparse_indices,
      ::tensorflow::Input sparse_values,
      ::tensorflow::Input sparse_shape,
      const AddManySparseToTensorsMap::Attrs & attrs
    )
    ```

        
      
      
        
    ### node


        
    ```
    ::tensorflow::Node * node() const 
    ```

        
      
      
        
    ### operator::tensorflow::Input


        
    ```
     operator::tensorflow::Input() const 
    ```

        
      
      
        
    ### operator::tensorflow::Output


        
    ```
     operator::tensorflow::Output() const 
    ```

        
      
      
    ## Public static functions


      
        
    ### Container


        
    ```
    Attrs Container(
      StringPiece x
    )
    ```

        
      
      
        
    ### SharedName


        
    ```
    Attrs SharedName(
      StringPiece x
    )
    ```