Setting up our environment
Before we examine data representations in TensorFlow, let’s set up our work environment. We will begin by importing TensorFlow and checking the version:
import tensorflow as tf #To check the version of TensorFlow print(tf.__version__)
When we run this block of code, we get the following output:
2.8.0
Hurray! We have successfully imported TensorFlow. Next, let us import NumPy and a couple of data types, as we will be using them shortly in this chapter:
import numpy as np from numpy import *
We have successfully completed all our import steps without errors. We will now look at data representations in TensorFlow as our working environment is fully set up.