要查看TensorFlow的版本,可以通过以下步骤:
import tensorflow as tf
tf.__version__
例如,在Python交互式环境中输入以下代码:
import tensorflow as tf print(tf.__version__)
运行后会输出当前安装的TensorFlow版本号。