TensorFlow is a programming system in which you represent computations as graphs. Nodes in the graph are called ops (short for operations). An op takes zero or more Tensors, performs some computation,and produces zero or more Tensors. A Tensor is a typed multidimensional array.
To use TensorFlow you need to understand how TensorFlow:
• Represents computations as graphs.
• Executes graphs in the context of Sessions.
• Represents data as tensors.
• Maintains state with Variables.
• Uses feeds and fetches to get data into and out of arbitrary operations
2 . Environment
$ uname -a
Linux jason-virtual-machine 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
3 . Installing
$ sudo apt-get install python-pip python-dev
$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
4 . Testing
import tensorflow as tf hello = tf.constant('hello, TensorFlow!') sess = tf.Session() print sess.run(hello) a = tf.constant(10) b = tf.constant(32) print sess.run(a+b)
hello, TensorFlow! 42