컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
텐서플로우:: 작전:: N번째요소
#include <nn_ops.h>
마지막 차원에 대한 n
차 통계 값을 찾습니다.
요약
입력이 벡터(순위-1)인 경우 벡터에서 n번째로 작은 값을 찾아 해당 값을 스칼라 텐서로 출력합니다.
행렬(각각 더 높은 순위 입력)의 경우 각 행(각각 마지막 차원을 따른 벡터)에서 n번째로 작은 값인 항목을 계산합니다. 따라서,
values.shape = input.shape[:-1]
인수:
- 범위: 범위 개체
- 입력: 1차원 이상, 마지막 차원이
n+1
이상입니다. - n: 0-D. 마지막 차원을 따라(행렬의 각 행을 따라) 선택할 정렬된 벡터의 위치입니다. n의 유효한 범위는
[0, input.shape[:-1])
입니다.
선택적 속성( Attrs
참조):
- reverse: True로 설정하면 벡터에서 n번째로 큰 값을 찾고 그 반대도 마찬가지입니다.
보고:
-
Output
: 각 마지막 차원 조각에 대한 n
차 통계입니다.
공개 속성
공공 기능
마디
::tensorflow::Node * node() const
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
공개 정적 함수
뒤집다
Attrs Reverse(
bool x
)
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(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/r1.15/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/r1.15/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/r1.15/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/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, ::`[tensorflow::Input](/versions/r1.15/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/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, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` n, const `[NthElement::Attrs](/versions/r1.15/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/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [values](#classtensorflow_1_1ops_1_1_nth_element_1a2b48d7270f25613807700819eff1cb49) | `::`[tensorflow::Output](/versions/r1.15/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/r1.15/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/r1.15/api_docs/cc/struct/tensorflow/ops/nth-element/attrs) | Optional attribute setters for [NthElement](/versions/r1.15/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```"]]