我是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。我尝试搜索这些错误,发现这意味着TensorFlow没有使用可以提高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是什么,所以我需要一步一步的说明。
非常感谢!
bazel ./configure
我得到:Command './configure' not found. Try 'bazel help'.
非常感谢您的帮助,正如您已经理解的那样,我真的不知道自己在做什么。 - Sorin Moruz