TensorFlow函数教程:tf.keras.activations.relu

2019-03-02 17:11 更新

tf.keras.activations.relu函数

tf.keras.activations.relu(
    x,
    alpha=0.0,
    max_value=None,
    threshold=0
)

定义在:tensorflow/python/keras/activations.py。

整流线性单元。

使用默认值,它返回按元素的max(x, 0)。

否则,它遵循:

  • 如果 x >= max_value:f(x) = max_value,
  • 如果 threshold <= x < max_value:f(x) = x,
  • 否则:f(x) = alpha * (x - threshold)。

参数:

  • x:张量或变量。
  • alpha:标量,负值部分的斜率(默认= 0.)。
  • max_value:浮点数。饱和度阈值。
  • threshold:浮点数。阈值激活的阈值。

返回:

张量。

以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy