tf.greater()

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/weixin_38145317/article/details/100554352

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]

猜你喜欢

转载自blog.csdn.net/weixin_38145317/article/details/100554352
tf