参考 tf.sigmoid()用法 - 云+社区 - 腾讯云
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:
[[ 0.7310586 0.88079703]
[ 0.7310586 0.88079703]
[ 0.7310586 0.88079703]]
Process finished with exit code 0