dragen1860 / Deep-Learning-with-TensorFlow-book

深度学习入门开源书,基于TensorFlow 2.0案例实战。Open source Deep Learning book, based on TensorFlow 2.0 framework.
http://www.ai101edu.com
13.21k stars 4.08k forks source link

P3,关于constant布尔类型 #114

Closed Baytwt closed 4 years ago

Baytwt commented 4 years ago

`a = tf.constant(True) # 布尔类型

print(a)

print(a == True)`

输出:

tf.Tensor(True, shape=(), dtype=bool)

tf.Tensor(True, shape=(), dtype=bool)

按照书上说的,第二个输出应该是False呀

dragen1860 commented 4 years ago

收到,谢谢!