Revisiting TensorFlow™

Over the weekend decided to continue experimenting with TensorFlow during the next couple weeks. The first task was to make sure my installation was up to date.

One of the requirements for TensorFlow on Windows is to use Python 3.5 or higher. For some reason my previously installed Python version switched to 2.7. I believe that happened when using Conda after installing TensorFlow for the first time. I checked my machine and Python was installed in the C:\Program Files\Python35 folder. Nevertheless I decided to download the latest version of Python and reinstall it. Apparently it was the same: 3.5.2.

Re installed TensorFlow as instructed by Google:

C:\> pip3 install --upgrade tensorflow
Collecting tensorflow
  Using cached tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
Requirement already up-to-date: wheel>=0.26 in c:\program files\python35\lib\site-packages (from tensorflow)
Collecting protobuf>=3.2.0 (from tensorflow)
Collecting numpy>=1.11.0 (from tensorflow)
  Using cached numpy-1.12.1-cp35-none-win_amd64.whl
Requirement already up-to-date: six>=1.10.0 in c:\program files\python35\lib\site-packages (from tensorflow)
Collecting werkzeug>=0.11.10 (from tensorflow)
  Using cached Werkzeug-0.12.2-py2.py3-none-any.whl
Collecting setuptools (from protobuf>=3.2.0->tensorflow)
  Using cached setuptools-35.0.2-py2.py3-none-any.whl
Collecting appdirs>=1.4.0 (from setuptools->protobuf>=3.2.0->tensorflow)
  Using cached appdirs-1.4.3-py2.py3-none-any.whl
Collecting packaging>=16.8 (from setuptools->protobuf>=3.2.0->tensorflow)
  Using cached packaging-16.8-py2.py3-none-any.whl
Collecting pyparsing (from packaging>=16.8->setuptools->protobuf>=3.2.0->tensorflow)
  Using cached pyparsing-2.2.0-py2.py3-none-any.whl
Installing collected packages: appdirs, pyparsing, packaging, setuptools, protobuf, numpy, werkzeug, tensorflow
  Found existing installation: setuptools 20.10.1
    Uninstalling setuptools-20.10.1:
      Successfully uninstalled setuptools-20.10.1
  Found existing installation: protobuf 3.1.0
    Uninstalling protobuf-3.1.0:
      Successfully uninstalled protobuf-3.1.0
  Found existing installation: numpy 1.11.2
    Uninstalling numpy-1.11.2:
      Successfully uninstalled numpy-1.11.2
  Found existing installation: tensorflow 0.12.0rc1
    Uninstalling tensorflow-0.12.0rc1:
      Successfully uninstalled tensorflow-0.12.0rc1
Successfully installed appdirs-1.4.3 numpy-1.12.1 packaging-16.8 protobuf-3.3.0 pyparsing-2.2.0 setuptools-35.0.2 tensorflow-1.1.0 werkzeug-0.12.2

Following Google’s instruction entered and executed a simple TensorFlow program (had changed since the original installation). My results follow:

C:\> python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
2017-05-21 10:43:25.057469: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The Te
nsorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.
2017-05-21 10:43:25.057860: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The Te
nsorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-21 10:43:25.058045: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The Te
nsorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-21 10:43:25.058217: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The Te
nsorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-21 10:43:25.058423: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The Te
nsorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
>>> print(sess.run(hello))
b'Hello, TensorFlow!'
>>> exit()
C:\>

A set of warnings were displayed. As suggested by Google took a look at Stack Overflow to address the issue. The issue is under article 43134753 in Stack Overflow. The issue is just a WARNING, not an ERROR. After reading what Stack Overflow had to say about the issue, I decided to look further into SSE instructions by following this link to Wikipedia. The links provided good descriptions regarding the warnings but no solution. It seems that one should be able to safely ignore the warnings. My machine has two four-core processors. Apparently is has a good set of unused by TensorFlow SSE instructions. The code will just run somewhat slower than it would without the use of a GPU card from NVIDIA. On a Linux machine I have a NVIDIA Tesla card but for now decided to stick to the Windows platform.

It seems like Google and NVIDIA (among other companies) are attempting to position themselves as the default source of hardware and software platforms for AI. You can read more about it on a previous retweet of mine or reading the original article Google Reveals a Powerful New AI Chip and Supercomputer from MIT Technology Review..

If you have a procedure to eliminate the WARNING messages from TensorFlow I would like to hear from you. As usual, if you have comments or questions regarding this or any other post, please leave me your comments in the area provided after this post.

Enjoy;

John

Follow me on Twitter:  @john_canessa

Leave a Reply

Your email address will not be published. Required fields are marked *