TensorFlow函數(shù)教程:tf.keras.activations.hard_sigmoid

2019-03-02 17:11 更新

tf.keras.activations.hard_sigmoid函數(shù)

tf.keras.activations.hard_sigmoid(x)

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

Hard sigmoid激活函數(shù)。

計(jì)算速度比 sigmoid 激活函數(shù)更快。

參數(shù):

  • x:輸入張量。

返回:

Hard sigmoid 激活:

  • 如果 x < -2.5,返回 0。
  • 如果 x > 2.5,返回 1。
  • 如果 -2.5 <= x <= 2.5,返回 0.2 * x + 0.5。
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)