tf.sparse_maximum()

tf.sparse_maximum(sp_a, sp_b, name=None)

Returns the element-wise max of two SparseTensors.

Assumes the two SparseTensors have the same shape, i.e., no broadcasting. Example:

sp_zero = ops.SparseTensor([[0]], [0], [7])
sp_one = ops.SparseTensor([[1]], [1], [7])
res = tf.sparse_maximum(sp_zero, sp_one).eval()
# "res" should be equal to SparseTensor([[0], [1]], [0, 1], [7]).
Args:
  • sp_a: a SparseTensor operand whose dtype is real, and indices lexicographically ordered.
  • sp_b: the other SparseTensor operand with the same requirements (and the same shape).
  • name: optional name of the operation.
Returns:
  • output: the output SparseTensor.
doc_TensorFlow
2016-10-14 13:09:12
Comments
Leave a Comment

Please login to continue.