RSVP for your your local TensorFlow Everywhere event today!


TensorFlow 1 version View source on GitHub

Element-wise maximum of two tensors.

x Tensor or variable.
y Tensor or variable.

A tensor with the element wise maximum value(s) of x and y.


x = tf.Variable([[1, 2], [3, 4]])
y = tf.Variable([[2, 1], [0, -1]])
m = tf.keras.backend.maximum(x, y)
<tf.Tensor: shape=(2, 2), dtype=int32, numpy=
array([[2, 2],
       [3, 4]], dtype=int32)>