Google is committed to advancing racial equity for Black communities. See how.

First Steps with TensorFlow: Programming Exercises

As you progress through Machine Learning Crash Course, you'll put machine learning concepts into practice by coding models in tf.keras. You'll use Colab as a programming environment. Colab is Google's version of Jupyter Notebook. Like Jupyter Notebook, Colab provides an interactive Python programming environment that combines text, code, graphics, and program output.

NumPy and pandas

Using tf.keras requires at least a little understanding of the following two open-source Python libraries:

  • NumPy, which simplifies representing arrays and performing linear algebra operations.
  • pandas, which provides an easy way to represent datasets in memory.

If you are unfamiliar with NumPy or pandas, please begin by doing the following two Colab exercises:

  1. NumPy Ultraquick Tutorial Colab exercise, which provides all the NumPy information you need for this course.
  2. pandas UltraQuick Tutorial Colab exercise, which provides all the pandas information you need for this course.

Linear regression with tf.keras

After gaining competency in NumPy and pandas, do the following two Colab exercises to explore linear regression and hyperparameter tuning in tf.keras:

  1. Linear Regression with Synthetic Data Colab exercise, which explores linear regression with a toy dataset.
  2. Linear Regression with a Real Dataset Colab exercise, which guides you through the kinds of analysis you should do on a real dataset.

Programming exercises run directly in your browser (no setup required!) using the Colaboratory platform. Colaboratory is supported on most major browsers, and is most thoroughly tested on desktop versions of Chrome and Firefox. If you'd prefer to download and run the exercises offline, see these instructions for setting up a local environment.