tf.keras.activations.selu(十)

本文详细介绍了tf.keras.activations.selu激活函数,该函数是根据Klambauer等人的2017年研究提出的,适用于使用lecun_normal初始化和AlphaDropout的场景。selu函数能够为输入张量提供尺度化的指数线性单元输出。

tf.keras.activations.selu

tf.keras.activations.selu(x)

 

Defined in tensorflow/python/keras/activations.py.

Scaled Exponential Linear Unit. (Klambauer et al., 2017).

Arguments:

  • x: A tensor or variable to compute the activation function for.

Returns:

Tensor with the same shape and dtype as `x`.

@tf_export('keras.activations.selu')
def selu(x):
  """Scaled Exponential Linear Unit. (Klambauer et al., 2017).
  Arguments:
      x: A tensor or variable to compute the activation function for.
  Returns:
      Tensor with the same shape and dtype as `x`.
  # Note
      - To be used together with the initialization "lecun_normal".
      - To be used together with the dropout variant "AlphaDropout".
  """
  alpha = 1.6732632423543772848170429916717
  scale = 1.0507009873554804934193349852946
  return scale * K.elu(x, alpha)

Note

- To be used together with the initialization "lecun_normal".
- To be used together with the dropout variant "AlphaDropout".

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值