Skip to content

Commit

Permalink
fix doc test
Browse files Browse the repository at this point in the history
  • Loading branch information
fsx950223 committed Oct 15, 2023
1 parent 554c26f commit 637d55a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tensorflow_addons/activations/gelu.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ def gelu(x: TensorLike, approximate: bool = True) -> tf.Tensor:
Usage:
>>> x = tf.constant([-1.0, 0.0, 1.0])
>>> x = tf.constant([0.0, 0.0, 1.0])
>>> tfa.activations.gelu(x, approximate=False)
<tf.Tensor: shape=(3,), dtype=float32, numpy=array([-0.15865529, 0. , 0.8413447 ], dtype=float32)>
<tf.Tensor: shape=(3,), dtype=float32, numpy=array([0. , 0. , 0.8413447], dtype=float32)>
>>> tfa.activations.gelu(x, approximate=True)
<tf.Tensor: shape=(3,), dtype=float32, numpy=array([-0.15880796, 0. , 0.841192 ], dtype=float32)>
<tf.Tensor: shape=(3,), dtype=float32, numpy=array([0. , 0. , 0.841192], dtype=float32)>
Args:
x: A `Tensor`. Must be one of the following types:
Expand Down

0 comments on commit 637d55a

Please sign in to comment.