Skip to content

Commit

Permalink
Updated example code in hard_sigmoid file
Browse files Browse the repository at this point in the history
  • Loading branch information
keerthanakadiri authored Nov 19, 2024
1 parent b5ddf32 commit 5461957
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions keras/src/activations/activations.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,14 @@ def hard_sigmoid(x):
Args:
x: Input tensor.
Example:
```
x = tf.constant([-0.2, -0.1, 0.0, 1.0, 2.0], )
y = tf.keras.activations.hard_sigmoid(x)
print(y.numpy())
```
Reference:
Expand Down

0 comments on commit 5461957

Please sign in to comment.