tensorflow::ops::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
Аргументы:
- scope: Объект Scope
- dimension: int16, int32 или int64, должно быть в диапазоне
[-rank(input), rank(input)). Описывает измерение входного тензора, по которому выполняется уменьшение. Для векторов используйте dimension = 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 operation
output
::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 )
node
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Публичные статические функции
OutputType
Attrs OutputType( DataType x )
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.9/api_docs/cc/class/tensorflow/ops/arg-max