Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::ArgMin
#include <math_ops.h>
Returns the index with the smallest value across dimensions of a tensor.
Summary
Note that in case of ties the identity of the return value is not guaranteed.
Usage:
import tensorflow as tf
a = [1, 10, 26.9, 2.8, 166.32, 62.3]
b = tf.math.argmin(input = a)
c = tf.keras.backend.eval(b)
# c = 0
# here a[0] = 1 which is the smallest element of a across axis 0
Arguments:
- scope: A Scope object
- dimension: int32 or int64, must be in the range
[-rank(input), rank(input))
. Describes which dimension of the input Tensor to reduce across. For vectors, use dimension = 0.
Returns:
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
OutputType
Attrs OutputType(
DataType x
)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-04-20 UTC.
[null,null,["Last updated 2020-04-20 UTC."],[],[],null,["# tensorflow::ops::ArgMin Class Reference\n\ntensorflow::ops::ArgMin\n=======================\n\n`#include \u003cmath_ops.h\u003e`\n\nReturns the index with the smallest 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.argmin(input = a)\n c = tf.keras.backend.eval(b)\n # c = 0\n # here a[0] = 1 which is the smallest element of a across axis 0\n \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- dimension: int32 or int64, must be in the range `[-rank(input), rank(input))`. Describes which dimension of the input [Tensor](/versions/r1.15/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/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The output tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ArgMin](#classtensorflow_1_1ops_1_1_arg_min_1a168791dd65474f6516ead5c14c228809)`(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)` dimension)` ||\n| [ArgMin](#classtensorflow_1_1ops_1_1_arg_min_1a585efda09c698305c3b4d4bd52e2ef89)`(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)` dimension, const `[ArgMin::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/arg-min/attrs#structtensorflow_1_1ops_1_1_arg_min_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_arg_min_1a2f56dc97fc445cb193387875c3d85750) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_arg_min_1adf842d8733fb5c05cf8773604ce4e39c) | `::`[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_arg_min_1aaa10eba6321c4a8bc4d7cf58a21e3328)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_arg_min_1a03587f44a8e9ecd6778a4a68e0fcf506)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_arg_min_1a191191cb11c666a611ba6e2bf95c15b7)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|\n| [OutputType](#classtensorflow_1_1ops_1_1_arg_min_1a164b1adce713e1a74f370b6fd657626f)`(DataType x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/arg-min/attrs#structtensorflow_1_1ops_1_1_arg_min_1_1_attrs) |\n\n| ### Structs ||\n|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ArgMin::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/arg-min/attrs) | Optional attribute setters for [ArgMin](/versions/r1.15/api_docs/cc/class/tensorflow/ops/arg-min#classtensorflow_1_1ops_1_1_arg_min). |\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### ArgMin\n\n```gdscript\n ArgMin(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input dimension\n)\n``` \n\n### ArgMin\n\n```gdscript\n ArgMin(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input dimension,\n const ArgMin::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```"]]