with tf.Session() as sess:
print(sess.run(tf.greater(1, 2))) # 1 > 2 ?, No, return False
print(sess.run(tf.less_equal(1, 2))) # 1 < 2 ?, Yes, return True
print(sess.run(tf.logical_and(tf.greater(1, 2), tf.less_equal(1, 2)))) # False
print(sess.run(tf.logical_or(tf.greater(1, 2), tf.less_equal(1, 2)))) # True
TensorFlow逻辑运算
最新推荐文章于 2022-05-13 22:52:38 发布