コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
テンソルフロー::作戦:: SparseReduceMaxSparse
#include <sparse_ops.h>
SparseTensor の次元全体の要素の最大値を計算します。
まとめ
この Op は SparseTensor を受け取り、 tf.reduce_max()
に相当するスパースです。 SparseReduceMaxとは対照的に、この Op は SparseTensor を返します。
reduction_axes
で指定された次元に沿ってsp_input
削減します。 keep_dims
が true でない限り、テンソルのランクは、 reduction_axes
のエントリごとに 1 ずつ減ります。 keep_dims
が true の場合、縮小された次元は長さ 1 で保持されます。
reduction_axes
にエントリがない場合、すべての次元が削減され、単一の要素を持つテンソルが返されます。さらに、軸は負の値になる場合があり、これは Python のインデックス付けルールに従って解釈されます。
引数:
- スコープ:スコープオブジェクト
- input_index: 2 次元。 SparseTensor 内の空でない値のインデックスを含む
N x R
行列 (標準的な順序付けではない可能性があります)。 - input_values: 1-D。
input_indices
に対応するN
の空でない値。 - input_shape: 1-D。入力 SparseTensor の形状。
- 削減軸: 1-D。長さ - 縮小軸を含む
K
ベクトル。
オプションの属性 ( Attrs
を参照):
- keep_dims: true の場合、長さ 1 の縮小された次元を保持します。
戻り値:
パブリック属性
公共機能
パブリック静的関数
KeepDims
Attrs KeepDims(
bool x
)
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-27 UTC。
[null,null,["最終更新日 2025-07-27 UTC。"],[],[],null,["# tensorflow::ops::SparseReduceMaxSparse Class Reference\n\ntensorflow::ops::SparseReduceMaxSparse\n======================================\n\n`#include \u003csparse_ops.h\u003e`\n\nComputes the max of elements across dimensions of a SparseTensor.\n\nSummary\n-------\n\nThis Op takes a SparseTensor and is the sparse counterpart to `tf.reduce_max()`. In contrast to [SparseReduceMax](/versions/r2.3/api_docs/cc/class/tensorflow/ops/sparse-reduce-max#classtensorflow_1_1ops_1_1_sparse_reduce_max), 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/r2.3/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/r2.3/api_docs/cc/struct/tensorflow/ops/sparse-reduce-max-sparse/attrs#structtensorflow_1_1ops_1_1_sparse_reduce_max_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/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_indices\n- [Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_values\n- [Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_shape\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [SparseReduceMaxSparse](#classtensorflow_1_1ops_1_1_sparse_reduce_max_sparse_1ae40de34c616688e6749e3d54974d7419)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_indices, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_values, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_shape, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` reduction_axes)` ||\n| [SparseReduceMaxSparse](#classtensorflow_1_1ops_1_1_sparse_reduce_max_sparse_1af854c14b3b0fa34f774983ea8a52a416)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_indices, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_values, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_shape, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` reduction_axes, const `[SparseReduceMaxSparse::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/sparse-reduce-max-sparse/attrs#structtensorflow_1_1ops_1_1_sparse_reduce_max_sparse_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_sparse_reduce_max_sparse_1aa6cec252b1244bc6accbfdc68ffbc161) | [Operation](/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output_indices](#classtensorflow_1_1ops_1_1_sparse_reduce_max_sparse_1a2135d88c64b5f47d76d060420eb7b3a8) | `::`[tensorflow::Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [output_shape](#classtensorflow_1_1ops_1_1_sparse_reduce_max_sparse_1a7ad897b2ce5a45a370c12f6f3c6209c3) | `::`[tensorflow::Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [output_values](#classtensorflow_1_1ops_1_1_sparse_reduce_max_sparse_1a2717637e81e732d547f2d1071c69b29f) | `::`[tensorflow::Output](/versions/r2.3/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_max_sparse_1a89cffc8d5e0c99499f3404400168d979)`(bool x)` | [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/sparse-reduce-max-sparse/attrs#structtensorflow_1_1ops_1_1_sparse_reduce_max_sparse_1_1_attrs) |\n\n| ### Structs ||\n|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::SparseReduceMaxSparse::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/sparse-reduce-max-sparse/attrs) | Optional attribute setters for [SparseReduceMaxSparse](/versions/r2.3/api_docs/cc/class/tensorflow/ops/sparse-reduce-max-sparse#classtensorflow_1_1ops_1_1_sparse_reduce_max_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### SparseReduceMaxSparse\n\n```gdscript\n SparseReduceMaxSparse(\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### SparseReduceMaxSparse\n\n```gdscript\n SparseReduceMaxSparse(\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 SparseReduceMaxSparse::Attrs & attrs\n)\n``` \n\nPublic static functions\n-----------------------\n\n### KeepDims\n\n```text\nAttrs KeepDims(\n bool x\n)\n```"]]