tensorflow:: אופס:: SparseReorder
#include <sparse_ops.h>
מסדר מחדש SparseTensor לסדר הקנוני, השורה הראשית.
תַקצִיר
שים לב שעל פי מוסכמה, כל הפעולות הדלילות משמרות את הסדר הקנוני לאורך מספר הממדים ההולך וגובר. הזמן היחיד שניתן להפר את הסדר הוא במהלך מניפולציה ידנית של וקטורי המדדים והערכים כדי להוסיף ערכים.
סידור מחדש אינו משפיע על צורת ה-SparseTensor.
אם לטנזור יש ערכים R
ו- N
שאינם ריקים, input_indices
יש צורה [N, R]
, ל-input_values יש אורך N
, ול-input_shape יש אורך R
טיעונים:
- scope: אובייקט Scope
- input_indexes: 2-D. מטריצת
N x R
עם המדדים של ערכים לא ריקים ב-SparseTensor, אולי לא בסדר קנוני. - input_values: 1-D.
N
ערכים לא ריקים התואמים ל-input_indices
. - input_shape: 1-D. צורת הקלט SparseTensor.
החזרות:
-
Output
פלט_מדדים: 2-D. מטריצתN x R
עם אותם מדדים כמו input_indexs, אבל בסדר קנוני של שורה-מז'ור. -
Output
output_values: 1-D.N
ערכים לא ריקים התואמים ל-output_indices
.
בנאים והורסים | |
---|---|
SparseReorder (const :: tensorflow::Scope & scope, :: tensorflow::Input input_indices, :: tensorflow::Input input_values, :: tensorflow::Input input_shape) |
תכונות ציבוריות | |
---|---|
operation | |
output_indices | |
output_values |
תכונות ציבוריות
מִבצָע
Operation operation
output_indexe
::tensorflow::Output output_indices
output_values
::tensorflow::Output output_values
תפקידים ציבוריים
SparseReorder
SparseReorder( const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_values, ::tensorflow::Input input_shape )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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```"]]