संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसरफ़्लो:: ऑप्स:: आर्गमैक्स
#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 का उपयोग करें।
रिटर्न:
सार्वजनिक गुण
सार्वजनिक समारोह
नोड
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ऑपरेटर::टेन्सरफ़्लो::आउटपुट
operator::tensorflow::Output() const
सार्वजनिक स्थैतिक कार्य
उत्पादन का प्रकार
Attrs OutputType(
DataType x
)
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],[],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```"]]