Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
flux tensoriel : : opérations : : AddManySparseToTensorsMap
#include <sparse_ops.h>
Ajoutez un N
-minibatch SparseTensor
à un SparseTensorsMap
, renvoyez N
handles.
Résumé
Un SparseTensor
de rang R
est représenté par trois tenseurs : sparse_indices
, sparse_values
et sparse_shape
, où
```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 TakeManySparseFromTensorsMap
. 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
AddManySparseToTensorsMap
as the shared_name
passed to
TakeManySparseFromTensorsMap
. Ensure the Operations are colocated.
Arguments:
* scope: A 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 SparseTensor
.
The minibatch size N == sparse_shape[0]
.
Optional attributes (see 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.
Returns:
* Output
: 1-D. The handles of the SparseTensor
now stored in the
SparseTensorsMap
. Shape: [N]
.
Attributs publics
Fonctions publiques
nœud
::tensorflow::Node * node() const
operator::tensorflow::Input() const
opérateur :: tensorflow :: Sortie
operator::tensorflow::Output() const
Fonctions statiques publiques
Récipient
Attrs Container(
StringPiece x
)
NomPartagé
Attrs SharedName(
StringPiece x
)
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[null,null,["Dernière mise à jour le 2025/07/26 (UTC)."],[],[],null,["# tensorflow::ops::AddManySparseToTensorsMap Class Reference\n\ntensorflow::ops::AddManySparseToTensorsMap\n==========================================\n\n`#include \u003csparse_ops.h\u003e`\n\n[Add](/versions/r2.1/api_docs/cc/class/tensorflow/ops/add#classtensorflow_1_1ops_1_1_add) an `N`-minibatch `SparseTensor` to a `SparseTensorsMap`, return `N` handles.\n\nSummary\n-------\n\nA `SparseTensor` of rank `R` is represented by three tensors: `sparse_indices`, `sparse_values`, and `sparse_shape`, where\n\n\\`\\`\\`sparse_indices.shape\\[1\\] == sparse_shape.shape\\[0\\] == R \n\n````scdoc\n\n \n An `N`-minibatch of `SparseTensor` objects is represented as a `SparseTensor`\nhaving a first `sparse_indices` column taking values between `[0, N)`, where\nthe minibatch size `N == sparse_shape[0]`.\n \n \n \n The input SparseTensor must have rank R greater than 1, and the first\n dimension is treated as the minibatch dimension. Elements of the SparseTensor\n must be sorted in increasing order of this first dimension. The stored\n SparseTensor objects pointed to by each row of the output sparse_handles\n will have rank R-1.\n\n\n\n \n \n \n The SparseTensor values can then be read out as part of a minibatch by passing\n the given keys as vector elements to /versions/r2.1/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\n the correct SparseTensorsMap is accessed, ensure that the same\n container and shared_name are passed to that Op. If no shared_name\n is provided here, instead use the name of the Operation created by calling\n /versions/r2.1/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\n /versions/r2.1/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.\n\n\n\n \n \n \n Arguments:\n * scope: A /versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope object\n * sparse_indices: 2-D. The indices of the minibatch SparseTensor.\n sparse_indices[:, 0] must be ordered values in [0, N).\n * sparse_values: 1-D. The `values` of the minibatch `SparseTensor`.\n * sparse_shape: 1-D. The shape of the minibatch SparseTensor.\n The minibatch size N == sparse_shape[0].\n\n\n\n \n \n \n Optional attributes (see /versions/r2.1/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):\n * container: The container name for the `SparseTensorsMap` created by this op.\n * shared_name: The shared name for the SparseTensorsMap created by this op.\n If blank, the new Operation's unique name is used.\n\n\n\n \n \n \n Returns:\n * /versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output: 1-D. The handles of the SparseTensor now stored in the\n SparseTensorsMap. Shape: [N]. \n\n\n\n \n \n \n \n \n### Constructors and Destructors\n\n\n \n \n \n \n #classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1a74a1831bfd1f27720873c62a4d963e68`(const ::`/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope` & scope, ::`/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input` sparse_indices, ::`/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input` sparse_values, ::`/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input` sparse_shape)`\n \n\n \n \n \n \n #classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1a77594a24c914fe60afa8f2fffb2be090`(const ::`/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope` & scope, ::`/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input` sparse_indices, ::`/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input` sparse_values, ::`/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input` sparse_shape, const `/versions/r2.1/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)`\n \n\n \n \n \n \n \n \n \n### Public attributes\n\n\n \n \n \n \n #classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1a0f5ef46531573dcf0f5db668d43daa9b\n \n \n \n /versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation\n \n \n \n \n \n #classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1ae6a15aa12ca7a7bdeffef3f72e82cbc2\n \n \n \n `::`/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output\n \n \n \n \n \n \n \n \n### Public functions\n\n\n \n \n \n \n #classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1aa2be23efa50022636a98ca3a1901d6f9`() const `\n \n \n \n `::tensorflow::Node *`\n \n \n \n \n \n #classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1a2019483d10b34a38eb43056dd01d0a67`() const `\n \n \n \n `\n `\n`\n `\n \n \n \n #classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1ab252ad5ffa96d26b5cd0d7a06ca1c45b`() const `\n \n \n \n `\n `\n`\n `\n \n \n \n \n \n \n### Public static functions\n\n\n \n \n \n \n #classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1ab040c34d4a6550b6f7856758403fe341`(StringPiece x)`\n \n \n \n /versions/r2.1/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\n \n \n \n \n \n #classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map_1a437ebb905e580d3d568136057b214620`(StringPiece x)`\n \n \n \n /versions/r2.1/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\n \n \n \n \n \n \n \n \n### Structs\n\n\n \n \n \n \n /versions/r2.1/api_docs/cc/struct/tensorflow/ops/add-many-sparse-to-tensors-map/attrs\n \n \n Optional attribute setters for /versions/r2.1/api_docs/cc/class/tensorflow/ops/add-many-sparse-to-tensors-map#classtensorflow_1_1ops_1_1_add_many_sparse_to_tensors_map. \n\n \n \n \n Public attributes\n \n \n### operation\n\n\n \n\n\n```text\nOperation operation\n```\n\n \n\n \n \n \n### sparse_handles\n\n\n \n\n\n```scdoc\n::tensorflow::Output sparse_handles\n```\n\n \n\n \n Public functions\n \n \n### AddManySparseToTensorsMap\n\n\n \n\n\n```gdscript\n AddManySparseToTensorsMap(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input sparse_indices,\n ::tensorflow::Input sparse_values,\n ::tensorflow::Input sparse_shape\n)\n```\n\n \n\n \n \n \n### AddManySparseToTensorsMap\n\n\n \n\n\n```gdscript\n AddManySparseToTensorsMap(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input sparse_indices,\n ::tensorflow::Input sparse_values,\n ::tensorflow::Input sparse_shape,\n const AddManySparseToTensorsMap::Attrs & attrs\n)\n```\n\n \n\n \n \n \n### node\n\n\n \n\n\n```gdscript\n::tensorflow::Node * node() const \n```\n\n \n\n \n \n \n### operator::tensorflow::Input\n\n\n \n\n\n```gdscript\n operator::tensorflow::Input() const \n```\n\n \n\n \n \n \n### operator::tensorflow::Output\n\n\n \n\n\n```gdscript\n operator::tensorflow::Output() const \n```\n\n \n\n \n Public static functions\n \n \n### Container\n\n\n \n\n\n```text\nAttrs Container(\n StringPiece x\n)\n```\n\n \n\n \n \n \n### SharedName\n\n\n \n\n\n```text\nAttrs SharedName(\n StringPiece x\n)\n```\n\n \n\n \n\n \n\n \n````"]]