tensorflow :: ops :: ArgMax
#include <math_ops.h>
Zwraca indeks o największej wartości w wymiarach tensora.
streszczenie
Należy zauważyć, że w przypadku powiązań tożsamość zwracanej wartości nie jest gwarantowana.
Sposób użycia:
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
Argumenty:
- zakres: obiekt Scope
- wymiar: int32 lub int64, musi mieścić się w zakresie
[-rank(input), rank(input))
. Opisuje, który wymiar wejściowego tensora należy zredukować. W przypadku wektorów użyj wymiaru = 0.
Zwroty:
-
Output
: tensor wyjściowy.
Konstruktorzy i niszczyciele | |
---|---|
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) |
Atrybuty publiczne | |
---|---|
operation | |
output |
Funkcje publiczne | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Publiczne funkcje statyczne | |
---|---|
OutputType (DataType x) |
Struktury | |
---|---|
tensorflow :: ops :: ArgMax :: Attrs |
Atrybuty publiczne
operacja
Operation operation
wynik
::tensorflow::Output output
Funkcje publiczne
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 )
węzeł
::tensorflow::Node * node() const
operator :: tensorflow :: Input
operator::tensorflow::Input() const
operator :: tensorflow :: Output
operator::tensorflow::Output() const
Publiczne funkcje statyczne
Typ wyjścia
Attrs OutputType( DataType x )