Tensorflow is, * A numerical computation library well suited for deep learning applications. * Modular and actively maintained. * Allows parallelization and efficient usage of available hardware. Supports distributed computing. * Powers many of Google’s large-scale services, including Search, Photos, Cloud Speech etc. * Comes with a great visualization tool called Tensorboard. * Easy to install, with PIP: pip3 install –upgrade tensorflow
import tensorflow as tf # Declare variables (with initial values) x = tf.Variable(3, name='x') y = tf.Variable(4, name='y') # Function (i.e. graph) to compute f = (x * x * y) + y + 2 ''' Till this point no actual computation will be done if we run the code, we just have declared a computation graph. Even the variables are not acutally initialized yet. Let's start the computation using a tensorflow session! ''' # Create session sess = tf.Session() # Initialize variables sess.run(x.initializer) sess.run(y.initializer) # Evaluate result result = sess.run(f) print(result)