SparseReduceSumSparse
SparseReduceSumSparse(
const ::tensorflow::Scope & scope,
::tensorflow::Input input_indices,
::tensorflow::Input input_values,
::tensorflow::Input input_shape,
::tensorflow::Input reduction_axes,
const SparseReduceSumSparse::Attrs & attrs
)
פונקציות סטטיות ציבוריות
KeepDims
Attrs KeepDims(
bool x
)
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],[],null,["# tensorflow::ops::SparseReduceSumSparse Class Reference\n\ntensorflow::ops::SparseReduceSumSparse\n======================================\n\n`#include \u003csparse_ops.h\u003e`\n\nComputes the sum of elements across dimensions of a SparseTensor.\n\nSummary\n-------\n\nThis Op takes a SparseTensor and is the sparse counterpart to `tf.reduce_sum()`. In contrast to [SparseReduceSum](/versions/r1.15/api_docs/cc/class/tensorflow/ops/sparse-reduce-sum#classtensorflow_1_1ops_1_1_sparse_reduce_sum), this Op returns a SparseTensor.\n\nReduces `sp_input` along the dimensions given in `reduction_axes`. Unless `keep_dims` is true, the rank of the tensor is reduced by 1 for each entry in `reduction_axes`. If `keep_dims` is true, the reduced dimensions are retained with length 1.\n\nIf `reduction_axes` has no entries, all dimensions are reduced, and a tensor with a single element is returned. Additionally, the axes can be negative, which are interpreted according to the indexing rules in Python.\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input_indices: 2-D. `N x R` matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.\n- input_values: 1-D. `N` non-empty values corresponding to `input_indices`.\n- input_shape: 1-D. Shape of the input SparseTensor.\n- reduction_axes: 1-D. Length-`K` vector containing the reduction axes.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sparse-reduce-sum-sparse/attrs#structtensorflow_1_1ops_1_1_sparse_reduce_sum_sparse_1_1_attrs)):\n\n- keep_dims: If true, retain reduced dimensions with length 1.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_indices\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_values\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_shape\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [SparseReduceSumSparse](#classtensorflow_1_1ops_1_1_sparse_reduce_sum_sparse_1a6f708aa542de1f8a78354e33cd93ba1f)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_indices, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_values, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_shape, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` reduction_axes)` ||\n| [SparseReduceSumSparse](#classtensorflow_1_1ops_1_1_sparse_reduce_sum_sparse_1a3993e307a94ec2d2689f821a60717e99)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_indices, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_values, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_shape, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` reduction_axes, const `[SparseReduceSumSparse::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sparse-reduce-sum-sparse/attrs#structtensorflow_1_1ops_1_1_sparse_reduce_sum_sparse_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_sparse_reduce_sum_sparse_1a163cffc8414946a47057a91af8be0e12) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output_indices](#classtensorflow_1_1ops_1_1_sparse_reduce_sum_sparse_1a2c546e86ac344ff2cc261c06aac187f4) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [output_shape](#classtensorflow_1_1ops_1_1_sparse_reduce_sum_sparse_1ad3c4282b03471d1e02bba7e17a46fca6) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [output_values](#classtensorflow_1_1ops_1_1_sparse_reduce_sum_sparse_1a19b2438eeddfcd3e79017ecb5de54318) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public static functions ||\n|---------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [KeepDims](#classtensorflow_1_1ops_1_1_sparse_reduce_sum_sparse_1a8dbe087349a7dd3db345a7abd6752c3d)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sparse-reduce-sum-sparse/attrs#structtensorflow_1_1ops_1_1_sparse_reduce_sum_sparse_1_1_attrs) |\n\n| ### Structs ||\n|-----------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::SparseReduceSumSparse::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sparse-reduce-sum-sparse/attrs) | Optional attribute setters for [SparseReduceSumSparse](/versions/r1.15/api_docs/cc/class/tensorflow/ops/sparse-reduce-sum-sparse#classtensorflow_1_1ops_1_1_sparse_reduce_sum_sparse). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output_indices\n\n```scdoc\n::tensorflow::Output output_indices\n``` \n\n### output_shape\n\n```scdoc\n::tensorflow::Output output_shape\n``` \n\n### output_values\n\n```scdoc\n::tensorflow::Output output_values\n``` \n\nPublic functions\n----------------\n\n### SparseReduceSumSparse\n\n```gdscript\n SparseReduceSumSparse(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input_indices,\n ::tensorflow::Input input_values,\n ::tensorflow::Input input_shape,\n ::tensorflow::Input reduction_axes\n)\n``` \n\n### SparseReduceSumSparse\n\n```gdscript\n SparseReduceSumSparse(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input_indices,\n ::tensorflow::Input input_values,\n ::tensorflow::Input input_shape,\n ::tensorflow::Input reduction_axes,\n const SparseReduceSumSparse::Attrs & attrs\n)\n``` \n\nPublic static functions\n-----------------------\n\n### KeepDims\n\n```text\nAttrs KeepDims(\n bool x\n)\n```"]]