Skip to content

Commit

Permalink
update doc string
Browse files Browse the repository at this point in the history
  • Loading branch information
JunnYu committed Oct 11, 2021
1 parent b5f9a20 commit 15c58a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/paddle/nn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ def weight_norm(*args):

__all__ = [ #noqa
'BatchNorm',
'CELU',
'GroupNorm',
'LayerNorm',
'SpectralNorm',
Expand Down
7 changes: 7 additions & 0 deletions python/paddle/nn/layer/activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,25 @@
class CELU(Layer):
r"""
CELU Activation.
.. math::
CELU(x) = max(0, x) + min(0, \alpha * (e^{x/\alpha}-1))
Parameters:
alpha (float, optional): The 'alpha' value of the CELU formulation. Default is 1.0.
name (str, optional): Name for the operation (optional, default is None).
For more information, please refer to :ref:`api_guide_Name`.
Shape:
- input: Tensor with any shape.
- output: Tensor with the same shape as input.
Examples:
.. code-block:: python
import paddle
x = paddle.to_tensor([[-1. ,6.], [1., 15.6]])
m = paddle.nn.CELU(0.2)
out = m(x)
Expand Down

1 comment on commit 15c58a4

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.