0

I'm new at machine learning, and relatively new at programming in general. I am trying to install Tensorflow on my machine through Anaconda. It has installed, but when I try to run the following code:

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

it gives me the error:

Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2.

I've done some reading which seems to indicate that I need to install a custom version of TensorFlow that works with my CPU. I also read that one way to go about this was through bazel build. (How to compile Tensorflow with SSE4.2 and AVX instructions?)

I downloaded bazel, but now am not able to use the command bazel build to customize TensorFlow for my laptop. I keep getting the error:

bazel is not recognised as an internal or external command, despite having moved it to a directory on my %PATH%.

Is there an easier way for me to install TensorFlow? If not, if anyone has any insight on why bazel is not being recognised, or if I'm doing something wrong that should be obvious, please let me know.

Thanks!

ATan
  • 11
  • 1
  • Those are not errors and can safely be ignored. See [this question](https://stackoverflow.com/questions/43134753/tensorflow-wasnt-compiled-to-use-sse-etc-instructions-but-these-are-availab) – FlyingTeller Jul 30 '18 at 09:56

1 Answers1

0

Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2.

As the message suggests, this is not an error. It simply says that the Tensorflow package you've downloaded isn't compiled to support the AVX2 instruction which are extensions to x86 instruction set. This instruction set isn't available till Sandy Bridge family CPU was released. Tensorflow is compiled to support as many platforms as possible and therefore it is very common to not support AVX2 in order to maintain its compatability. If you want more information, here is much more in-depth description.

edhu
  • 449
  • 6
  • 23