tf.raw_ops.SparseReduceMax | TensorFlow v2.16.1 (original) (raw)
tf.raw_ops.SparseReduceMax
Stay organized with collections Save and categorize content based on your preferences.
Computes the max of elements across dimensions of a SparseTensor.
View aliases
Compat aliases for migration
SeeMigration guide for more details.
tf.compat.v1.raw_ops.SparseReduceMax
tf.raw_ops.SparseReduceMax(
input_indices,
input_values,
input_shape,
reduction_axes,
keep_dims=False,
name=None
)
This Op takes a SparseTensor and is the sparse counterpart totf.reduce_max(). In particular, this Op also returns a dense Tensor
instead of a sparse one.
Reduces sp_input
along the dimensions given in reduction_axes
. Unlesskeep_dims
is true, the rank of the tensor is reduced by 1 for each entry inreduction_axes
. If keep_dims
is true, the reduced dimensions are retained with length 1.
If reduction_axes
has no entries, all dimensions are reduced, and a tensor with a single element is returned. Additionally, the axes can be negative, which are interpreted according to the indexing rules in Python.
Args | |
---|---|
input_indices | A Tensor of type int64. 2-D. N x R matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering. |
input_values | A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. 1-D. N non-empty values corresponding to input_indices. |
input_shape | A Tensor of type int64. 1-D. Shape of the input SparseTensor. |
reduction_axes | A Tensor of type int32. 1-D. Length-K vector containing the reduction axes. |
keep_dims | An optional bool. Defaults to False. If true, retain reduced dimensions with length 1. |
name | A name for the operation (optional). |
Returns |
---|
A Tensor. Has the same type as input_values. |