tf.nn.softmax 解析
代码示例
import tensorflow as tf
y=[0,0.1,0.5,0.8,1.0,0.999]
yy=tf.nn.softmax(y)
init=tf.global_variables_initializer()
with tf.Session() as sess:
sess.run(init)
print(sess.run(yy))
[0.08761724 0.09683202 0.1444564 0.19499575 0.23816834 0.2379303 ]