通过Nightly安装的TensorFlow是否为1.5版本?实测版本为1.6.0-dev
解答:Nightly安装的TensorFlow不是1.5版本
从你给出的实测输出就能直接得出结论:通过Nightly方式安装的TensorFlow并不是1.5版本,而是1.6.0-dev20180105——这是TensorFlow 1.6版本的每日开发预览版(dev后缀代表开发版)。
关于Nightly构建的说明
Nightly安装方式获取的是TensorFlow团队每日更新的开发版本,它的版本号会跟着开发进度迭代,永远领先于当前的正式稳定版,包含最新的功能修复、特性尝试,但稳定性通常不如正式发布的版本,不建议在生产环境使用。
你的实测代码验证
下面是你提供的实测代码及输出,清晰显示了版本信息:
chg0901@ubuntu:~$ python3 Python 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tensorflow as tf 2018-01-06 16:49:32.242801: I tensorflow/core/platform/s3/aws_logging.cc:53] Initializing Curl library >>> print(tf.__version__) 1.6.0-dev20180105 >>> x = [[2.]] >>> m = tf.matmul(x,x) >>> print(m) Tensor("MatMul:0", shape=(1, 1), dtype=float32) >>> print(tf.Session().run(m)) 2018-01-06 16:51:25.418750: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX FMA [[ 4.]]
如何安装TensorFlow 1.5正式版
如果你确实需要使用1.5版本的正式版,可以通过指定版本号的方式安装,pip命令如下:
pip3 install tensorflow==1.5.0
内容的提问来源于stack exchange,提问作者Hong Cheng




