tensorflow:: אופס:: NthElement
#include <nn_ops.h>
מוצא ערכים של סטטיסטיקת הסדר n
עבור הממד האחרון.
תַקצִיר
אם הקלט הוא וקטור (דרגה-1), מוצא את הערכים שהוא הערך ה-n' הקטן ביותר בווקטור ומוציא את הערכים שלהם כטנזור סקלרי.
עבור מטריצות (לפי קלט בדרגה גבוהה יותר), מחשב את הערכים שהוא הערך ה-n' הקטן ביותר בכל שורה (לפי וקטור לאורך הממד האחרון). כָּך,
values.shape = input.shape[:-1]
טיעונים:
- scope: אובייקט Scope
- קלט: 1-D ומעלה עם ממד אחרון לפחות
n+1
. - n: 0-D. מיקום של וקטור ממוין לבחירה לאורך הממד האחרון (לאורך כל שורה עבור מטריצות). טווח חוקי של n הוא
[0, input.shape[:-1])
מאפיינים אופציונליים (ראה Attrs
):
- הפוך: כאשר מוגדר כ-True, מצא את הערך ה-n-הגדול בווקטור ולהיפך.
החזרות:
-
Output
: סטטיסטיקת הסדרn
לאורך כל פרוסה ממדית אחרונה.
בנאים והורסים | |
---|---|
NthElement (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input n) | |
NthElement (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input n, const NthElement::Attrs & attrs) |
תכונות ציבוריות | |
---|---|
operation | |
values |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
פונקציות סטטיות ציבוריות | |
---|---|
Reverse (bool x) |
מבנים | |
---|---|
tensorflow:: ops:: NthElement:: Attrs | קובעי תכונות אופציונליים עבור NthElement . |
תכונות ציבוריות
מִבצָע
Operation operation
ערכים
::tensorflow::Output values
תפקידים ציבוריים
NthElement
NthElement( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input n )
NthElement
NthElement( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input n, const NthElement::Attrs & attrs )
צוֹמֶת
::tensorflow::Node * node() const
מפעיל::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
פונקציות סטטיות ציבוריות
לַהֲפוֹך
Attrs Reverse( bool x )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# tensorflow::ops::NthElement Class Reference\n\ntensorflow::ops::NthElement\n===========================\n\n`#include \u003cnn_ops.h\u003e`\n\nFinds values of the `n`-th order statistic for the last dimension.\n\nSummary\n-------\n\nIf the input is a vector (rank-1), finds the entries which is the nth-smallest value in the vector and outputs their values as scalar tensor.\n\nFor matrices (resp. higher rank input), computes the entries which is the nth-smallest value in each row (resp. vector along the last dimension). Thus, \n\n```cplint\nvalues.shape = input.shape[:-1]\n```\n\n\u003cbr /\u003e\n\nArguments:\n\n- scope: A [Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: 1-D or higher with last dimension at least `n+1`.\n- n: 0-D. Position of sorted vector to select along the last dimension (along each row for matrices). Valid range of n is `[0, input.shape[:-1])`\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/nth-element/attrs#structtensorflow_1_1ops_1_1_nth_element_1_1_attrs)):\n\n- reverse: When set to True, find the nth-largest value in the vector and vice versa.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The `n`-th order statistic along each last dimensional slice.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [NthElement](#classtensorflow_1_1ops_1_1_nth_element_1ad57d32106099de0a7c5cd0e118f56250)`(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, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` n)` ||\n| [NthElement](#classtensorflow_1_1ops_1_1_nth_element_1a2c84dbdc0bb358d13e010718142e8462)`(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, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` n, const `[NthElement::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/nth-element/attrs#structtensorflow_1_1ops_1_1_nth_element_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_nth_element_1a41b2c3dfd7a0fa9341473a14fab18494) | [Operation](/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [values](#classtensorflow_1_1ops_1_1_nth_element_1a2b48d7270f25613807700819eff1cb49) | `::`[tensorflow::Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_nth_element_1a3f9b0440c04a7d951228451e291f008b)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_nth_element_1a9c60d391af60a8d7c268aacbf8a7093b)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_nth_element_1ab7ba43882ec3623ce6d7c9bd9e2b47ba)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| [Reverse](#classtensorflow_1_1ops_1_1_nth_element_1ad86f92398afd7420e3f6db7643954291)`(bool x)` | [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/nth-element/attrs#structtensorflow_1_1ops_1_1_nth_element_1_1_attrs) |\n\n| ### Structs ||\n|----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::NthElement::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/nth-element/attrs) | Optional attribute setters for [NthElement](/versions/r2.3/api_docs/cc/class/tensorflow/ops/nth-element#classtensorflow_1_1ops_1_1_nth_element). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### values\n\n```text\n::tensorflow::Output values\n``` \n\nPublic functions\n----------------\n\n### NthElement\n\n```gdscript\n NthElement(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input n\n)\n``` \n\n### NthElement\n\n```gdscript\n NthElement(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input n,\n const NthElement::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### Reverse\n\n```text\nAttrs Reverse(\n bool x\n)\n```"]]