تدفق التوتر:: العمليات:: ArgMax
#include <math_ops.h>
إرجاع الفهرس بأكبر قيمة عبر أبعاد الموتر.
ملخص
لاحظ أنه في حالة الروابط لا يتم ضمان هوية قيمة الإرجاع.
الاستخدام:
import tensorflow as tf a = [1, 10, 26.9, 2.8, 166.32, 62.3] b = tf.math.argmax(input = a) c = tf.keras.backend.eval(b) # c = 4 # here a[4] = 166.32 which is the largest element of a across axis 0
الحجج:
- النطاق: كائن النطاق
- البعد: int32 أو int64، يجب أن يكون في النطاق
[-rank(input), rank(input))
. يصف البعد الذي يجب تقليله من موتر الإدخال. بالنسبة للمتجهات، استخدم البعد = 0.
العوائد:
-
Output
: موتر الإخراج.
البنائين والمدمرين | |
---|---|
ArgMax (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input dimension) | |
ArgMax (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input dimension, const ArgMax::Attrs & attrs) |
الصفات العامة | |
---|---|
operation | |
output |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
وظائف ثابتة العامة | |
---|---|
OutputType (DataType x) |
الهياكل | |
---|---|
Tensorflow:: ops:: ArgMax:: Attrs | محددات السمات الاختيارية لـ ArgMax . |
الصفات العامة
عملية
Operation operation
الإخراج
::tensorflow::Output output
الوظائف العامة
ArgMax
ArgMax( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input dimension )
ArgMax
ArgMax( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input dimension, const ArgMax::Attrs & attrs )
العقدة
::tensorflow::Node * node() const
المشغل::tensorflow::الإدخال
operator::tensorflow::Input() const
المشغل::tensorflow::الإخراج
operator::tensorflow::Output() const
وظائف ثابتة العامة
نوع الإخراج
Attrs OutputType( DataType x )
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# tensorflow::ops::ArgMax Class Reference\n\ntensorflow::ops::ArgMax\n=======================\n\n`#include \u003cmath_ops.h\u003e`\n\nReturns the index with the largest value across dimensions of a tensor.\n\nSummary\n-------\n\nNote that in case of ties the identity of the return value is not guaranteed.\n\nUsage: \n\n```python\n import tensorflow as tf\n a = [1, 10, 26.9, 2.8, 166.32, 62.3]\n b = tf.math.argmax(input = a)\n c = tf.keras.backend.eval(b)\n # c = 4\n # here a[4] = 166.32 which is the largest element of a across axis 0\n \n```\n\n\u003cbr /\u003e\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- dimension: int32 or int64, must be in the range `[-rank(input), rank(input))`. Describes which dimension of the input [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) to reduce across. For vectors, use dimension = 0.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The output tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ArgMax](#classtensorflow_1_1ops_1_1_arg_max_1abfe8a95c471e85d0f404f93189a3d616)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` dimension)` ||\n| [ArgMax](#classtensorflow_1_1ops_1_1_arg_max_1a534c4b1988d0fe5c5150338c42c115b2)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` dimension, const `[ArgMax::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/arg-max/attrs#structtensorflow_1_1ops_1_1_arg_max_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_arg_max_1a60663c9ffb26ff3cb9dc201881e87a3a) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_arg_max_1a2e1f5ef358c10195be899e08e0a3b46c) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_arg_max_1ad8106e00a969b5bb5791dd57f0831f26)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_arg_max_1accba38db65bed3a37b5872a4d19b5dae)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_arg_max_1a1620a09f5066f00dc88f6ed91b70cd37)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|\n| [OutputType](#classtensorflow_1_1ops_1_1_arg_max_1a25eece835d32a5e813f6bbe1047fc6e8)`(DataType x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/arg-max/attrs#structtensorflow_1_1ops_1_1_arg_max_1_1_attrs) |\n\n| ### Structs ||\n|--------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ArgMax::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/arg-max/attrs) | Optional attribute setters for [ArgMax](/versions/r2.2/api_docs/cc/class/tensorflow/ops/arg-max#classtensorflow_1_1ops_1_1_arg_max). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### ArgMax\n\n```gdscript\n ArgMax(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input dimension\n)\n``` \n\n### ArgMax\n\n```gdscript\n ArgMax(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input dimension,\n const ArgMax::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### OutputType\n\n```text\nAttrs OutputType(\n DataType x\n)\n```"]]