Computes the maximum of elements across dimensions of a tf.Tensor.
Reduces the input along the dimensions given in axes. Unless keepDims
is true, the rank of the tf.Tensor is reduced by 1 for each entry in
axes. If keepDims is true, the reduced dimensions are retained with
length 1. If axes has no entries, all dimensions are reduced, and a
tf.Tensor with a single element is returned.
constx = tf.tensor1d([1, 2, 3]);
x.max().print(); // or tf.max(x)
constx = tf.tensor2d([1, 2, 3, 4], [2, 2]);
constaxis = 1; x.max(axis).print(); // or tf.max(x, axis)
Computes the maximum of elements across dimensions of a
tf.Tensor
.Reduces the input along the dimensions given in
axes
. UnlesskeepDims
is true, the rank of thetf.Tensor
is reduced by 1 for each entry inaxes
. IfkeepDims
is true, the reduced dimensions are retained with length 1. Ifaxes
has no entries, all dimensions are reduced, and atf.Tensor
with a single element is returned.