Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated doc for tf.keras.backend.maximum #29435

Merged
merged 4 commits into from
Jul 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions tensorflow/python/keras/activations.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,6 @@ def linear(x):

Returns:
The linear activation: `x`.

Note:
Often used as last layer of regression networks.
"""
return x

Expand Down
14 changes: 13 additions & 1 deletion tensorflow/python/keras/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,19 @@ def maximum(x, y):
y: Tensor or variable.

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

Examples:
```python
# 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)>
```
"""
return math_ops.maximum(x, y)

Expand Down