版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
tf.greater(a,b)
功能:比较a、b两个值的大小
返回值:一个列表,元素值都是true和false
import tensorflow as tf
a=[1,2,8,4]
b=[5,6,7,8]
sess=tf.Session()
with sess.as_default():
print(tf.greater(a,b).eval())#[False False True False]