コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
テンソルフロー::作戦::スパースリオーダー
#include <sparse_ops.h>
SparseTensor を正規の行優先の順序に並べ替えます。
まとめ
慣例により、すべてのスパース演算は次元数の増加に応じて正規の順序を保持することに注意してください。順序に違反する可能性があるのは、インデックスと値ベクトルを手動で操作してエントリを追加するときだけです。
並べ替えは SparseTensor の形状には影響しません。
テンソルのランクR
とN
空でない値がある場合、 input_indices
の形状は[N, R]
、input_values の長さはN
、input_shape の長さはR
です。
引数:
- スコープ:スコープオブジェクト
- input_index: 2 次元。 SparseTensor 内の空でない値のインデックスを含む
N x R
行列 (標準的な順序付けではない可能性があります)。 - input_values: 1-D。
input_indices
に対応するN
の空でない値。 - input_shape: 1-D。入力 SparseTensor の形状。
戻り値:
-
Output
output_indices: 2-D。 input_indices と同じインデックスを持つN x R
行列ですが、正規の行優先順序です。 -
Output
output_values: 1-D。 output_indices
に対応するN
の空でない値。
パブリック属性
公共機能
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[],[],null,["# tensorflow::ops::SparseReorder Class Reference\n\ntensorflow::ops::SparseReorder\n==============================\n\n`#include \u003csparse_ops.h\u003e`\n\nReorders a SparseTensor into the canonical, row-major ordering.\n\nSummary\n-------\n\nNote that by convention, all sparse ops preserve the canonical ordering along increasing dimension number. The only time ordering can be violated is during manual manipulation of the indices and values vectors to add entries.\n\nReordering does not affect the shape of the SparseTensor.\n\nIf the tensor has rank `R` and `N` non-empty values, `input_indices` has shape `[N, R]`, input_values has length `N`, and input_shape has length `R`.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/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\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_indices: 2-D. `N x R` matrix with the same indices as input_indices, but in canonical row-major ordering.\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_values: 1-D. `N` non-empty values corresponding to `output_indices`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [SparseReorder](#classtensorflow_1_1ops_1_1_sparse_reorder_1aafcce71e6de3ad9b8ce9618fe3b636a0)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_indices, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_values, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_shape)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_sparse_reorder_1adbdca22d516880fc4093b79caf22bad3) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output_indices](#classtensorflow_1_1ops_1_1_sparse_reorder_1af583efc1f49452eefa81d966158fd3b6) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [output_values](#classtensorflow_1_1ops_1_1_sparse_reorder_1ad573d2b883ff9fa37df6b1ae4bc4ec18) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\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_values\n\n```scdoc\n::tensorflow::Output output_values\n``` \n\nPublic functions\n----------------\n\n### SparseReorder\n\n```gdscript\n SparseReorder(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input_indices,\n ::tensorflow::Input input_values,\n ::tensorflow::Input input_shape\n)\n```"]]