Load a TensorFlow Dataset with Web Data

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In this lab, you will practice retrieving data from the internet using Python. Once downloaded, you will parse it and load it into a TensorFlow Dataset.

### Prerequisites
This lab is designed to be completed in PyCharm running on your machine. You should have PyCharm and TensorFlow installed before attempting this lab. We will not be covering this setup in the lab.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Retrieve Iris Data from the Internet

Download the iris data from the UC Irvine Machine Learning Repository.

Your code should be respectful of their bandwidth and not repeatedly download the data once it is available locally.

Prepare the Iris Data

Load the iris data into your program. Convert the raw data to appropriate types for training a model.

Load the Data into a TensorFlow Dataset

Split the data into features and labels. Create a Dataset from the features and labels.

Additional Resources

Scenario

You recently discovered some flowers while on a hike that you're pretty sure are irises. You'd love to know what they are so you can plant some yourself, so you took pictures and measurements. Luckily, you found a set of data describing iris flowers that you can use to train a TensorFlow model to predict the iris species. Download the data, parse it, and load it into a TensorFlow Dataset for easy consumption by your model.

Iris data, hosted by the UC Irvine Machine Learning Repository.

Lab Goals

  1. Retrieve Iris data from the internet.
  2. Parse the Iris data.
  3. Load the Iris data into a TensorFlow Dataset.

Logging In To the Lab Environment

No environment is provided for this lab. This lab is meant to be completed in PyCharm running on your own hardware in preparation for the TensorFlow Developer Certificate Exam. If you don't have PyCharm or are not working toward the certification, you can use the provided Google account credentials, or your own account, to complete the tasks in Google Colab. If you use the provided credentials to access Colab, make sure to save a copy of your work locally before the end of the lab.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?