TensorFlow 2.0: A Powerful New Deep Learning Tool

Jose Portilla

Udemy for Business instructor & Head of Data Science for Pierian Data Inc.

November 25, 2019

TensorFlow 2.0 is a deep learning library developed by Google built to solve large machine learning projects. This open-source library, based on artificial neural networks, can use massive datasets to derive insights and predictions. TensorFlow 2.0 is now so much more than its original incarnation. It has a whole ecosystem of tools and availability in programming languages such as JavaScript and Swift and is a more user-friendly tool. These improvements make TensorFlow 2.0 a powerful way to get started in deep learning, which I’m excited to teach in my new course, Complete TensorFlow 2.0 and Keras Deep Learning Bootcamp

TensorFlow was named the number one trending tech skill for 2020 and beyond in the Udemy for Business report 2020 Workplace Learning Trends Report: The Skills of the Future. Let’s explore more about TensorFlow, why you and your company might use it, common applications of the library, and how TensorFlow 2.0 differs from its predecessor.

TensorFlow: Deep learning vs. machine learning

It’s useful to understand TensorFlow’s place in the world of artificial intelligence, specifically why it’s considered a deep learning tool within the greater machine learning discipline.

Machine learning is a general approach that uses a variety of algorithms to extract insights out of data. As datasets grow, so do the complexities of the algorithms used to interpret that data. Algorithms built for small datasets may be able to tell the algorithm what to do in every possible scenario. But in large datasets with millions of data points, that simply isn’t realistic. Instead, machine learning techniques teach algorithms how to learn from the data they ingest and find insights from those learnings and trends. 

A common machine learning example is found on real estate websites like Zillow to predict the listing price of a house. An algorithm ingests historic data on sales of houses in the area, including the number of bedrooms, bathrooms, cosmetic features, and more to then determine the likely value of the house. 

Deep learning methods of artificial intelligence use artificial neural networks to accomplish tasks similar to those considered in machine learning. Due to their unique capabilities, deep learning methods can perform complex tasks that are impossible for typical machine learning algorithms. For example, deep learning neural networks can identify objects in images such as identifying a cat versus a dog in an uploaded image (a project we do in my course). 

Neural networks accomplish these tasks because they are designed to mimic how the human brain’s biological neurons operate. Neurons work together to think, learn, process information, make decisions, etc. A neural network simulates a brain’s functionality by arranging artificial neurons into layers and connecting those layers. Artificial neurons (perceptrons) accept inputs and provide usable outputs through the use of an activation function.

4 important tools in the TensorFlow ecosystem

As TensorFlow adoption has grown, its user community has created an ecosystem of tools that solve a wide array of problems like the use of a specific programming language, easier data ingestion, or serving models to a customer. Some of the most useful tools include:

  • TensorBoard — Technically this is a separate library, but still part of the TensorFlow ecosystem. It’s an automated dashboard working in conjunction with TensorFlow to monitor how well your model is learning and adopting your dataset. It can also visualize a graph of your network so you can verify if it matches your intended design.
  • TensorFlow.js — This JavaScript library trains and deploys models in the browser. As an example, this could be used in a photo uploader on a website to describe the content of the photo — no downloading required by the user. 
  • TensorFlow Lite — This light version of TensorFlow is used for deploying models on mobile or Internet of Things devices with much less processing power than a desktop or cloud computer. For example, TensorFlow Lite might be used for an app that identifies the nutritional information (typical caloric content, carbohydrates, etc.) based on an uploaded image of a plate of food.  
  • TensorFlow Extended — Intended for large cloud computing productions at scale, TensorFlow Extended (TFX) prepares data from start to finish to deployment. A TFX pipeline is a sequence of components that implement an ML pipeline which is specifically designed for scalable, high-performance machine learning tasks. That includes modeling, training, serving inference, and managing deployments to online, native mobile, and JavaScript targets. 

TensorFlow is the #1 trending tech skill on Udemy.com this year! Discover the full list of trending tech skills in the 2020 Workplace Learning Trends Report.

Why TensorFlow over other deep learning libraries?

While quite a few deep learning libraries are used in industry and academia, TensorFlow is a solid choice for engineers of various expertise levels for several reasons: 

  1. Large community — TensorFlow is hugely popular in the deep learning community. You’ll find active online groups, frequent in-person meetup opportunities, and plenty of educational resources for you and your team. 
  2. Backed by Google — Google invested heavily in AI research in the last decade, which earned it AI and data science credibility across many of its products, including Google Cloud. It continues to resource TensorFlow’s development and open-source accessibility while also using it across many of its own commercial and enterprise products. 
  3. Tools ecosystem — Other deep learning libraries don’t have a robust ecosystem of tools like those we explored above. Many libraries began as a research method and weren’t fully intended for production use. Google’s prioritization of a production-ready product helped establish a strong community of enthusiasts who built related tools. Google also provides Google Colaboratory, a free tool for developers to write, run, and share code within Google Drive.

What’s new in TensorFlow 2.0?

TensorFlow was initially designed for advanced practitioners and was not easy for beginners. Its early version had a complicated static graph system requiring developers to define the entire graph in code before running models. TensorFlow 2.0 is now designed with usability in mind and is a great choice for students new to deep learning and offers a few fresh features including:

  • Keras integration — When TensorFlow first debuted, it used high-level APIs for user experimentation that were fairly complicated, especially for beginners. With the introduction of TensorFlow 2.0, the default API is now Keras. Keras is an easy-to-use high-level API that allows for simple and fast prototyping through user-friendliness, modularity, and extensibility. It fully supports both convolutional networks and recurrent networks, as well as combinations of the two. The TensorFlow 2.0 Keras API also runs seamlessly on CPU and GPU.
  • Eager execution by default — TensorFlow 2.0 executes eagerly (like Python normally does), meaning graphs and sessions should feel like implementation details. This makes the library much easier to use and makes debugging more straightforward.
  • Standardization — An engineer’s best friend, standardization aligns everything across the different versions of TensorFlow. If you save a Python TensorFlow model, you’ll have the ability to serve it across all the different ecosystem pieces. The goal is to have teams and developers write TensorFlow once in a single language like Python, but then execute it to any application.

TensorFlow applications and examples 

One of the most popular examples of TensorFlow is called image classification, which trains a neural network to reliably identify which animal is in a photo, for example. But, TensorFlow has so many more applications than that relatively simple classification. We can understand more of TensorFlow’s real-world applications through the lens of their specific neural networks subcategories.

  • Artificial Neural Networks (ANN) — This type of neural network excels at supervised learning tasks including classification and regression models. A regression task could be the prediction of housing prices in a specific neighborhood, like the real estate website example we noted earlier. In our course, we take a look at real data from historical sales in the Seattle area and build a model to predict the sale price of future homes put on the market.

Example of ANN regression model to predict housing prices.

Classification models predict the category of something. In the course, we examine real data from LendingClub to predict whether or not a borrower will pay back their loan given historical feature information about the person.


Example of a classification model that predicts loan remittance likelihood.
  • Convolutional Neural Network (CNN) — Here, datasets are used to analyze images and video. A high-performing example is handwriting analysis, which has great accuracy thanks to MNIST, a database of handwritten digits and letters. Where can you see convolutional neural networks (CNNs) used most often? Your mailbox. CNN-powered machines can now interpret the handwriting on your holiday card envelope as good as or better than humans. CNNs are also now used as the basis for self-driving vehicles as they analyze camera images from vehicles. In the TensorFlow 2.0 course, you’ll work with real image files, such as identifying .jpg images of dogs.

Example from the TensorFlow 2.0 course of a CNN algorithm that identifies photos of animals.

Recurrent Neural Network — Another deep learning methodology where TensorFlow is applied is through the recurrent neural network (RNN). RNN excels at problems based on sequences such as predicting future sales based on historical sales data or estimating next season’s pumpkin yields through previous seasonal information. In my course, you will be learning how to forecast future sales data.


A sales prediction visualization created from an RNN algorithm.

With TensorFlow 2.0’s updates making it easier to use for technical teams and engineers of all experience levels, this is a great time to start building neural networks and make your deep learning projects come to life. Start learning in my course Complete TensorFlow 2.0 and Keras Deep Learning Bootcamp.

About the author:

Jose Portilla has a BS and MS in Mechanical Engineering from Santa Clara University and years of experience as a professional instructor in data science and programming. Over the course of his career, he developed a skill set in analyzing data and he hopes to use his experience in teaching and data science to help other people learn the power of programming the ability to analyze data, as well as present the data in clear and beautiful visualizations. Currently, he works as the Head of Data Science for Pierian Data Inc.

About Udemy for Business:

Udemy for Business is a learning platform that helps companies stay competitive in today’s rapidly changing workplace by offering fresh, relevant on-demand learning content, curated from the Udemy marketplace. Our mission is to help employees do whatever comes next—whether that’s the next project to do, skill to learn, or role to master. We’d love to partner with you on your employee development needs. Get in touch with us at business@udemy.com

2020 Workplace Learning Trends Report: The Skills of the Future thumbnail

report

Discover the latest trending tech & soft skills, top 10 skills by industry & role, and how organizations are preparing their workforce for the future.

More from Tech Skills Topic

Tech Skills

Github Tutorial: How to Make Your First GitHub Repository

A critical skill for developers of all experience levels is proficiency in GitHub. Github is a hosting platform for Git...

Tech Skills

10 In-Demand Professional Skills Your Employees Need December 2019

As the end of the year draws closer, it’s only natural to start thinking about how we’d like to close...

Tech Skills

How AWS DevOps Tools Can Integrate Your Tech Teams

Amazon Web Services (AWS) is a popular solution for companies building a DevOps practice across technical teams. Since there are...