Skip to content

Commit

Permalink
correct misspelling and test case (#20417)
Browse files Browse the repository at this point in the history
  • Loading branch information
shashaka authored Oct 26, 2024
1 parent 5e37be8 commit 533ea63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion keras/src/activations/activations_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ def celu(x, alpha=1.0):

x = np.random.random((2, 5))
result = activations.celu(x[np.newaxis, :], alpha=0.5)[0]
expected = celu(x, True)
expected = celu(x, alpha=0.5)
self.assertAllClose(result, expected, rtol=1e-05)

def test_glu(self):
Expand Down
2 changes: 1 addition & 1 deletion keras/src/ops/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ def hard_tanh(x):
Example:
>>> x = x = np.array([-2., -1., 0., 1., 2.])
>>> x = np.array([-2., -1., 0., 1., 2.])
>>> x_hard_tanh = keras.ops.hard_tanh(x)
>>> print(x_hard_tanh)
array([-1. -1. 0. 1. 1.], shape=(5,), dtype=float64)
Expand Down

0 comments on commit 533ea63

Please sign in to comment.