代码语言:javascript复制
import tensorflow as tf
a = tf.constant([[1.0, 2.0], [1.0, 2.0], [1.0, 2.0]])
sess = tf.Session()
print(sess.run(tf.sigmoid(a)))
output:
代码语言:javascript复制 [[ 0.7310586 0.88079703]
[ 0.7310586 0.88079703]
[ 0.7310586 0.88079703]]
Process finished with exit code 0