# tf.keras.backend.maximum

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 1 version](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/backend/maximum) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/python/keras/backend.py#L2416-L2439) |

Element-wise maximum of two tensors.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.keras.backend.maximum`](https://www.tensorflow.org/api_docs/python/tf/keras/backend/maximum)

<br />

    tf.keras.backend.maximum(
        x, y
    )

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `x` | Tensor or variable. |
| `y` | Tensor or variable. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor with the element wise maximum value(s) of `x` and `y`. ||

<br />

#### Examples:

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