tf.keras.backend.maximum
| View source on GitHub |
Максимальное значение по элементам двух тензоров.
tf.keras.backend.maximum(
x, y
)
| Аргументы | |
|---|---|
x | Тензор или переменная. |
y | Тензор или переменная. |
| Возвращает | |
|---|---|
Тензор с максимальными значениями по элементам x и y. |
Примеры:
x = tf.Variable([[1, 2], [3, 4]])
y = tf.Variable([[2, 1], [0, -1]])
m = tf.keras.backend.maximum(x, y)
m
<tf.Tensor: shape=(2, 2), dtype=int32, numpy=
array([[2, 2],
[3, 4]], dtype=int32)>
© 2020 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/versions/r2.3/api_docs/python/tf/keras/backend/maximum