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

2019-03-02 17:11 更新

tf.keras.activations.hard_sigmoid函数

tf.keras.activations.hard_sigmoid(x)

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

Hard sigmoid激活函数。

计算速度比 sigmoid 激活函数更快。

参数:

  • x:输入张量。

返回:

Hard sigmoid 激活:

  • 如果 x < -2.5,返回 0。
  • 如果 x > 2.5,返回 1。
  • 如果 -2.5 <= x <= 2.5,返回 0.2 * x + 0.5。
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号