我最近安装了tensorflow (Windows CPU版本),收到了以下消息:
成功安装tensorflow-1.4.0 tensorflow-tensorboard-0.4.0rc2
然后当我试图逃跑的时候
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
sess.run(hello)
'Hello, TensorFlow!'
a = tf.constant(10)
b = tf.constant(32)
sess.run(a + b)
42
sess.close()
(我是在https://github.com/tensorflow/tensorflow上找到的)
我收到了以下信息:
2017-11-02 01:56:21.698935: I C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard。cc:137]你的CPU支持这个TensorFlow二进制文件没有被编译使用的指令:AVX AVX2
但当我逃跑时
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
它正常运行并输出Hello, TensorFlow!,这表明安装确实是成功的,但还有一些地方是错误的。
你知道问题是什么以及如何解决它吗?
他提供了一次名单,被人删了却看到答案是
下载软件包列表
输出:
F:\temp\Python>python test_tf_logics_.py
[0, 0, 26, 12, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0]
[ 0 0 0 26 12 0 0 0 2 0 0 0 0 0 0 0 0]
[ 0 0 26 12 0 0 0 2 0 0 0 0 0 0 0 0 0]
2022-03-23 15:47:05.516025: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-03-23 15:47:06.161476: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 10 MB memory: -> device: 0, name: NVIDIA GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0, compute capability: 6.1
[0 0 2 0 0 0 0 7 0 0 0 0 0 0 0 0 0]
...