一、softmax
x = tf.constant([[1, 2, 3]], dtype=tf.float32)
r = tf.nn.softmax(x)
s = tf.Session()
print(s.run(r))
运行结果:
[[0.09003057 0.24472848 0.66524094]]
x = tf.constant([[1, 2, 3]], dtype=tf.float32)
r = tf.nn.softmax(x)
s = tf.Session()
print(s.run(r))
运行结果:
[[0.09003057 0.24472848 0.66524094]]