TensorFlow: Data and Deployment

Bringing a machine learning model into the real world involves a lot more than just modeling. This Specialization will teach you how to navigate various deployment scenarios and use data more effectively to train your model. You’ll learn how to:

  • Run models in your browser using TensorFlow.js
  • Prepare and deploy models on mobile devices using TensorFlow Lite
  • Access, organize, and process training data more easily using TensorFlow Data Services
  • Explore four advanced deployment scenarios including federated learning

These courses build upon our TensorFlow in Practice Specialization, in which you learn how to build models using TensorFlow best practices. If you are new to TensorFlow, we recommend that you take the TensorFlow in Practice Specialization first. To develop a deeper, foundational understanding of how neural networks work, we recommend that you take the Deep Learning Specialization.

[Update] Course 3: Date Pipelines with TensorFlow Data Service was refreshed in October 2020.

  • Changes in TensorFlow API: Since this Specialization was launched in early 2020, there have been changes to the TensorFlow API which affect the material in Weeks 1 and 2. With this refresh, you can access updated lectures, quizzes, and assignments.
  • Changing the Difficulty Level of Assignments: Based on valuable learner feedback, we’ve revised the Week 4 assignments to ensure that you have a full grasp of the foundational principles and are well-prepared to tackle them.

Course 1

Browser-based Models with TensorFlow.js

Course 2

Device-based Models with TensorFlow Lite

Course 3

Data Pipelines with TensorFlow Data Services

Course 4

Advanced Deployment Scenarios with TensorFlow

Course 1: Browser-based Models with TensorFlow.js

You may think that machine learning models can only be trained with supercomputers and big data. This first course shows you how you can train and run machine learning models in any browser using TensorFlow.js. You’ll learn techniques for handling data in the browser, and at the end you’ll build a computer vision project that recognizes and classifies objects from a webcam.


Week 1: Training and Inference Using Javascript

  • Introduction: A conversation with Andrew Ng
  • Starting the code
  • Training
  • First example in code
  • Using an imported dataset for a multi-class classifier
  • Looking at the data
  • One hot encoding
  • Designing the neural network
  • Iris classifier in code

Week 2: Running Inference on Models in the Browser

  • Introduction: A conversation with Andrew Ng
  • Creating a convolutional net with JavaScript
  • Visualization of the training
  • What is a sprite sheet?
  • Looking deeper into the code
  • Handwriting classifier in code

Week 3: Running Models in a Browser

  • Introduction: A conversation with Andrew Ng
  • Text-based models
  • Toxicity classifier in code
  • MobileNet
  • Using a pre-trained MobileNet
  • Converting to JavaScript

Week 4: Rock Paper Scissors

  • Introduction: A conversation with Andrew Ng
  • Transfer learning
  • Building a simple web page
  • Retraining the MobileNet model
  • Training function
  • Code to capturing the data
  • The dataset class
  • Training the network
  • Rock paper scissors in code

Course 2: Device-based Models with TensorFlow Lite

You know how to build models in TensorFlow, but how do you get it into the hands of real people? This second course teaches you how to run your machine learning models in mobile applications. You’ll learn how to prepare models for a lower-powered, battery-operated devices, then execute models on both Android and iOS platforms. Finally, you’ll explore how to deploy on embedded systems using TensorFlow on Raspberry Pi and microcontrollers.


Week 1: Device-based Models with TensorFlow Lite

  • Introduction: A conversation with Andrew Ng
  • Features and components of mobile AI
  • Architecture and performance
  • Optimization techniques
  • Saving, converting, and optimizing a model
  • Quantization
  • TF-Select
  • Paths in optimization
  • Running the models
  • Transfer learning
  • Converting a model to TF Lite
  • Transfer learning with TF Lite

Week 2: Running a TensorFlow Model in an Android App

  • Introduction: A conversation with Andrew Ng
  • Installation and resources
  • Architecture of a model
  • Preparing the input
  • Inference and results
  • Run the app
  • Classifying camera images
  • Initialize and prepare the input
  • Demo of a camera image classifier
  • Demo of the object detection app

Week 3: Building the TensorFlow Model on iOS

  • Introduction: A conversation with Andrew Ng
  • What is Swift?
  • TensorFlow Lite Swift
  • Cats vs. dogs app
  • Scaling the image
  • Looking at the app in Xcode
  • App architecture
  • Model details
  • Looking at the code for the image classification app
  • Object classification intro
  • TF Lite detect app
  • Looking at the code for the object detection model

Week 4: TensorFlow Lite on Devices

  • Introduction: A conversation with Andrew Ng
  • Devices
  • Starting to work on a Raspberry Pi
  • Image classification
  • The four-step process
  • Object detection
  • Raspberry Pi demo
  • Microcontrollers

Course 3: Data Pipelines with TensorFlow Data Services

In this third course, you will:

  • Perform efficient ETL tasks using Tensorflow Data Services APIs
  • Construct train/validation/test splits of any dataset – either custom or present in TensorFlow Hub Dataset library – using Splits API
  • Use different modules and functions of the TFDS API to prepare your data for training pipelines
  • Identify bottlenecks in your input pipelines and increase your workflow efficiency by input parallelization


Week 1: Data Pipelines with TensorFlow Data Services

  • A Conversation with Andrew Ng
  • Popular Datasets
  • Data Pipelines
  • Extract, Transform, and Load
  • Versioning Datasets
  • Looking at the Notebook
  • Try Out the Notebook Yourself
  • Using TFDS in Keras to Train Fashion MNIST
  • Horses or Humans in TFDS
  • Try the Horses or Human Notebook


Week 2: Splits and Slices API for Datasets in TensorFlow

  • Introduction to Splits API
  • Splits API Notebook Walkthrough
  • File Structure in TensorFlow Datasets
  • Feature Descriptors
  • TFRecord Colab Walkthrough


Week 3: Exporting your Data into the Training Pipeline

  • A Conversation with Andrew Ng
  • Input Data
  • Basic Mechanics
  • Numeric and Bucketized Columns
  • Vocabulary and Hashed Columns, Feature Crossing
  • Embedding Columns
  • Notebook Walkthrough
  • Loading Data Present Outside TFDS using Numpy, Pandas,
  • Image Data
  • CSV Data
  • Text Data and TFRecords
  • Generators


Week 4: Performance

  • Notebook walkthrough
  • A Conversation with Andrew Ng
  • ETL
  • What Happens When You Train a Model
  • Caching
  • Parallelism APIs
  • Autotuning
  • Parallelizing Data Extraction
  • Best Practices for Code Improvements
  • A Few Words by Laurence

Course 4: Advanced Deployment Scenarios with TensorFlow

In this final course, you’ll explore four different scenarios you’ll encounter when deploying models. You’ll be introduced to TensorFlow Serving, a technology that lets you do inference over the web. You’ll move on to TensorFlow Hub, a repository of models that you can use for transfer learning. Then you’ll use TensorBoard to evaluate and understand how your models work, as well as share your model metadata with others. Finally, you’ll explore federated learning and how you can retrain deployed models with user data while maintaining data privacy.


Week 1: TensorFlow Extended

  • Introduction: A conversation with Andrew Ng
  • Serving
  • Installing TF Serving
  • Setup for serving
  • Predictions
  • Passing data to serving
  • Getting the predictions back
  • Running the colab
  • Complex model


Week 2: Sharing pre-trained models with TensorFlow Hub

  • Introduction: A conversation with Andrew Ng
  • Introduction to TF Hub
  • Transfer Learning
  • Inference
  • Module Storage
  • Text-based models
  • Word embeddings
  • Experimenting with embeddings
  • Classify cats and dogs
  • Transfer learning


Week 3: Tensorboard: tools for model training

  • Introduction: A conversation with Andrew Ng
  • Tensorboard scalars
  • Callbacks
  • Histograms
  • Publishing model details
  • Local tensorboard
  • Looking at graphics in a dataset
  • More than one image
  • Confusion matrix
  • Multiple callbacks


Week 4: Federated learning

  • Introduction: A conversation with Andrew Ng
  • Training on mobile devices
  • Data at the edge
  • How it works
  • Maintaining user privacy
  • Masking
  • APIs for federated learning
  • Example of federated learning


Frequently Asked Questions

Who is the Specialization for?
The TensorFlow: Data and Deployment Specialization is for anyone who has a basic understanding of how to build models in TensorFlow and wants to learn how to more effectively train and deploy models in TensorFlow.
What will I learn in the Specialization?
In Course 1, you’ll learn how to run models in your browser using TensorFlow.js. In Course 2, you’ll prepare your model for mobile devices using TensorFlow Lite. In Course 3, you’ll access, organize, and process training data more easily using TensorFlow Data Services. In Course 4, you’ll explore four advanced deployment scenarios including federated learning.
Are there any prerequisites?
We recommend taking our TensorFlow in Practice Specialization first to understand how to build models in TensorFlow and understand best practices.
How do I take the Specialization?
You can enroll in the Specialization on Coursera’s platform. You will watch videos and complete assignments on Coursera as well.
How long is the Specialization?
It typically takes 4 weeks, 4-5 hours per week to complete each course. There will be four courses in the Specialization.
How much does the Specialization cost?
The Specialization costs $49/month. You can also purchase each course for $49.
How do I audit the Specialization?
You can audit the TensorFlow Specialization for free by going to the homepage of the course, clicking “Enroll,” and clicking “audit” at the bottom of the window. Note that you will not receive a certificate at the end of the course if you choose to audit.
Can I apply for financial aid?
Yes, Coursera provides financial aid to learners who cannot afford the fee. You can apply for it by going to the Coursera course page and clicking on the Financial Aid link beneath the “Enroll” button on the left.
Will I receive a certificate at the end of the Specialization?
You will receive a certificate at the end of each course if you pay for the courses and complete the programming assignments. There is a limit of 180 days of certificate eligibility, after which you would have to re-purchase the course. If you audit the course for free, you will not receive a certificate.

Once all four courses in the Specialization are released and you are subscribed to the Specialization, you will also receive a certificate for the Specialization if you complete all four courses.

Is this a stand-alone course or a Specialization?

This is a deeplearning.ai Specialization made up of multiple courses. You can take the Specialization now on Coursera.

About the Instructors

Laurence Moroney is a Developer Advocate at Google working on Artificial Intelligence with TensorFlow. As the author of more programming books than he can count, he’s excited to be working with deeplearning.ai and Coursera in producing video training.

When not working with technology, he’s a member of the Science Fiction Writers of America, having authored several science fiction novels, a produced screenplay and comic books, including the prequel to the movie ‘Equilibrium’ starring Christian Bale. Laurence is based in Washington State, where he drinks way too much coffee.

Andrew Ng is a global leader in AI and co-founder of Coursera. Dr. Ng is also the CEO and founder of deeplearning.ai and founder of Landing AI. He is an Adjunct Professor in the Computer Science Department at Stanford University.

He was until recently Chief Scientist at Baidu, where he was responsible for driving the company’s global AI strategy and infrastructure. He was also the founding lead of the Google Brain team. Dr. Ng has authored or co-authored over 100 research papers in machine learning, robotics and related fields. He holds degrees from Carnegie Mellon University, MIT and the University of California, Berkeley.

We use cookies to collect information about our website and how users interact with it. We’ll use this information solely to improve the site. You are agreeing to consent to our use of cookies if you click ‘OK’. All information we collect using cookies will be subject to and protected by our Privacy Policy, which you can view here.