tf.sigmoid()用法

2022-09-02 20:38:52 浏览数 (1)

代码语言: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

0 人点赞