Graph

In TensorFlow, all computations are represented as graphs. A graph consists of nodes. The nodes in a graph are called operations or ops. An op or node can take tensors. Tensors are basically typed multi-dimensional arrays. For example, an image can be a tensor. So, in short, the TensorFlow graph has the description of all the computation required.

In the preceding example, the ops of the graphs are as follows:

    hello = tf.constant('Hello, TensorFlow!') 
    a = tf.constant(12) 
    b = tf.constant(34) 

These tf.constant() methods create a constant op that will be added as a node in the graph. You can see how a string and integer are added to the graph.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.248.208