1、softplus函数表达式
图像:
2、tensorflow 举例
import tensorflow as tf input=tf.constant([0,1,2,3],dtype=tf.float32) output=tf.nn.softplus(input) with tf.Session() as sess: print('input:') print(sess.run(input)) print('output:') print(sess.run(output)) sess.close()
输出结果:
input:
[ 0. 1. 2. 3.]
output:
[ 0.69314718 1.31326163 2.12692809 3.04858732]