V
- data type for output()
output@Operator(group="math") public final class ArgMax<V extends Number> extends PrimitiveOp implements Operand<V>
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.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
operation
Modifier and Type | Method and Description |
---|---|
Output<V> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <T,U extends Number> |
create(Scope scope,
Operand<T> input,
Operand<U> dimension)
Factory method to create a class wrapping a new ArgMax operation using default output types.
|
static <V extends Number,T,U extends Number> |
create(Scope scope,
Operand<T> input,
Operand<U> dimension,
Class<V> outputType)
Factory method to create a class wrapping a new ArgMax operation.
|
Output<V> |
output() |
equals, hashCode, op, toString
public static <V extends Number,T,U extends Number> ArgMax<V> create(Scope scope, Operand<T> input, Operand<U> dimension, Class<V> outputType)
scope
- current scopeinput
- 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.outputType
- public static <T,U extends Number> ArgMax<Long> create(Scope scope, Operand<T> input, Operand<U> dimension)
scope
- current scopeinput
- 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.public Output<V> asOutput()
Operand
Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.
asOutput
in interface Operand<V extends Number>
OperationBuilder.addInput(Output)
Copyright © 2022. All rights reserved.