elu

paddle.fluid.layers.nn. elu ( x, alpha=1.0, name=None ) [source]
Alias_main

paddle.nn.functional.elu :alias: paddle.nn.functional.elu,paddle.nn.functional.activation.elu :old_api: paddle.fluid.layers.elu

${comment} :param x: ${x_comment} :type x: ${x_type} :param alpha: ${alpha_comment} :type alpha: ${alpha_type}|1.0 :param name: The default value is None. Normally there is no need for user to set this property.

System Message: ERROR/3 (/usr/local/lib/python3.8/site-packages/paddle/fluid/layers/nn.py:docstring of paddle.fluid.layers.nn.elu, line 11)

Unexpected indentation.

For more information, please refer to Name.

System Message: WARNING/2 (/usr/local/lib/python3.8/site-packages/paddle/fluid/layers/nn.py:docstring of paddle.fluid.layers.nn.elu, line 12)

Block quote ends without a blank line; unexpected unindent.

Returns

${out_comment}

Return type

${out_type}

Examples

import paddle.fluid as fluid
import numpy as np

input_elu = np.array([[-1,6],[1,15.6]])
with fluid.dygraph.guard():
    x = fluid.dygraph.to_variable(input_elu)
    y = fluid.layers.elu(x, alpha=0.2)
    print(y.numpy())
    # [[-0.12642411  6.        ]
    # [ 1.          15.6       ]]