TensorFlow - animeshtrivedi/notes GitHub Wiki

Get started

Python 2.7 or 3.0 : https://www.quora.com/Which-version-of-Python-is-more-often-used-in-machine-learning-Python-2-7-or-Python-3-0+ . According to this, use python 2.7 which is widely used and has all the packages.

Setting up

Install pip and setup tensorflow

sudo apt-get install python-pip python-dev 
pip install tensorflow

output-log

Verifying

$ python
Python 2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
2018-05-16 14:40:35.540562: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
>>> print(sess.run(hello))
Hello, TensorFlow!
>>> 

Got warning:

It is ok https://stackoverflow.com/questions/47068709/your-cpu-supports-instructions-that-this-tensorflow-binary-was-not-compiled-to-u. But for a performance benchmark this is not ok.