tensorflow-tf.nn.softplus

tf.nn.softplus(features, name = None)

解釋:這個函數的作用是計算激活函數softplus,即log( exp( features ) + 1)。

使用例子:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import tensorflow as tf

a = tf.constant([-1.0, 12.0])
with tf.Session() as sess:
    b = tf.nn.softplus(a)
    print sess.run(b)

輸入參數:

features: 一個Tensor。數據類型必須是:float32,float64,int32,int64,uint8,int16或者int8。
name: (可選)爲這個操作取一個名字。
輸出參數: 

  • 一個Tensor,數據類型和features相同。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章