Spec-Zone.ru › TensorFlow C++ 2.3

tensorflow::ops::ArgMax

#include <math_ops.h>

Возвращает индекс с максимальным значением по измерениям тензора.

Summary

Обратите внимание, что в случае совпадения значений идентичность возвращаемого значения не гарантируется.

Использование:

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: int32 или int64, должно быть в диапазоне [-rank(input), rank(input)). Определяет измерение входного тензора Tensor, по которому выполняется уменьшение. Для векторов используйте 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
Operation
output
::tensorflow::Output
Общедоступные функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Общедоступные статические функции
OutputType(DataType x)
Attrs
Структуры
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
)

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/arg-max

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API