1、softsign函数
图像
2、tensorflow softsign应用
import tensorflow as tf input=tf.constant([0,-1,2,-30,30],dtype=tf.float32) output=tf.nn.softsign(input) with tf.Session() as sess: print(‘input:‘) print(sess.run(input)) print(‘output:‘) print(sess.run(output)) sess.close()
输出结果:
input:
[ 0. -1. 2. -30. 30.]
output:
[ 0. -0.5 0.66666669 -0.96774191 0.96774191]
时间: 2024-10-04 18:42:43