我是Tensorflow的新手。 我使用的是64位版本的Windows 10,我想为CPU安装Tensorflow。 我不记得我安装它的确切步骤,但是当我使用以下方法检查安装时:
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
我有以下输出:
2017-10-18 09:56:21.656601: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-10-18 09:56:21.656984: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
b'Hello, TensorFlow!'
我使用SublimeREPL包在Sublime Text 3中运行python。 我试图搜索这些错误,发现这意味着张量流是在没有这些指令的情况下构建的,这可以提高CPU的性能。我还找到了隐藏这些警告的代码,但实际上我想使用这些说明。
我找到的代码是:
bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-msse4.2 --copt=-msse4.1 --copt=-msse3 --copt=-mfma -k //tensorflow/tools/pip_package:build_pip_package
但我得到了这个输出:
ERROR: Skipping '//tensorflow/tools/pip_package:build_pip_package': no such package 'tensorflow/tools/pip_package': BUILD file not found on package path.
WARNING: Target pattern parsing failed. Continuing anyway.
INFO: Found 0 targets...
ERROR: command succeeded, but there were errors parsing the target pattern.
INFO: Elapsed time: 8,147s, Critical Path: 0,02s
我该如何解决这个问题? 最后,我不明白pip,wheel和bazel是什么,所以我需要一步一步的说明。
非常感谢你!