tensorflow softplus应用

 

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]

 

posted @ 2017-07-22 10:02  debuggor  阅读(1791)  评论(0编辑  收藏  举报