July 2019
Intermediate to advanced
512 pages
19h 39m
English
A computational graph with operations on its nodes and tensors to its edges will be created, and in order to execute the graph, we use a TensorFlow session.
A TensorFlow session can be created using tf.Session(), as shown in the following code, and it will allocate memory for storing the current value of the variable:
sess = tf.Session()
After creating the session, we can execute our graph, using the sess.run() method.
Every computation in TensorFlow is represented by a computational graph, so we need to run a computational graph for everything. That is, in order to compute anything on TensorFlow, we need to create a TensorFlow session.
Let's execute the following code to multiply two numbers:
a = tf.multiply(3,3)print(a)
Instead ...
Read now
Unlock full access