tf.sparse.minimum
Stay organized with collections
Save and categorize content based on your preferences.
Returns the element-wise min of two SparseTensors.
tf.sparse.minimum(
sp_a, sp_b, name=None
)
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]).
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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.sparse.minimum\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 2 version](/api_docs/python/tf/sparse/minimum) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/sparse_ops.py#L2502-L2537) |\n\nReturns the element-wise min of two SparseTensors.\n\n#### View aliases\n\n\n**Main aliases**\n\n\\`tf.sparse_minimum\\`\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.sparse.minimum`](/api_docs/python/tf/sparse/minimum), [`tf.compat.v1.sparse_minimum`](/api_docs/python/tf/sparse/minimum), \\`tf.compat.v2.sparse.minimum\\`\n\n\u003cbr /\u003e\n\n tf.sparse.minimum(\n sp_a, sp_b, name=None\n )\n\nAssumes the two SparseTensors have the same shape, i.e., no broadcasting.\nExample: \n\n sp_zero = sparse_tensor.SparseTensor([[0]], [0], [7])\n sp_one = sparse_tensor.SparseTensor([[1]], [1], [7])\n res = tf.sparse.minimum(sp_zero, sp_one).eval()\n # \"res\" should be equal to SparseTensor([[0], [1]], [0, 0], [7]).\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|--------------------------------------------------------------------------------------|\n| `sp_a` | a `SparseTensor` operand whose dtype is real, and indices lexicographically ordered. |\n| `sp_b` | the other `SparseTensor` operand with the same requirements (and the same shape). |\n| `name` | optional name of the operation. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|----------|--------------------------|\n| `output` | the output SparseTensor. |\n\n\u003cbr /\u003e"]]