tf.sparse_minimum(sp_a, sp_b, name=None)
See the guide: Sparse Tensors > Math Operations
Returns the element-wise min of two SparseTensors.
Assumes the two SparseTensors have the same shape, i.e., no broadcasting. Example:
sp_zero = sparse_tensor.SparseTensor([[0]], [0], [7]) sp_one = sparse_tensor.SparseTensor([[1]], [1], [7]) res = tf.sparse_minimum(sp_zero, sp_one).eval() # "res" should be equal to SparseTensor([[0], [1]], [0, 0], [7]).
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.Defined in tensorflow/python/ops/sparse_ops.py
.
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/sparse_minimum