激活函数-relu

来源:互联网 发布:淘宝公益宝贝产品好吗 编辑:程序博客网 时间:2024/05/17 09:38
import tensorflow as tfa = tf.constant([-1.0, 2.0])with tf.Session() as sess:    b = tf.nn.relu(a)    print sess.run(b)


[ 0.  2.]