August 2018
Intermediate to advanced
272 pages
7h 2m
English
Now that you have installed TensorFlow, let's check whether it works correctly. In your Command Prompt, activate your environment again if it isn't already, and run Python by entering the following:
(tf_env)$ python
Now, enter the following lines into the Python interpreter to test that TensorFlow is installed correctly:
>>>> import tensorflow as tf >>>> x = tf.constant('Tensorflow works!') >>>> sess = tf.Session() >>>> sess.run(x)
If everything is installed correctly, you should see the following output:
b'Tensorflow works!'
What you just typed there is the Hello World of TensorFlow. You created a graph containing a single tf.constant, which is just a constant Tensor. The Tensor was inferred to ...
Read now
Unlock full access