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相同。