The TensorFlow Workshop
eBook - ePub

The TensorFlow Workshop

A hands-on guide to building deep learning models from scratch using real-world datasets

Matthew Moocarme, Anthony So, Anthony Maddalone

Share book
  1. 600 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

The TensorFlow Workshop

A hands-on guide to building deep learning models from scratch using real-world datasets

Matthew Moocarme, Anthony So, Anthony Maddalone

Book details
Book preview
Table of contents
Citations

About This Book

Get started with TensorFlow fundamentals to build and train deep learning models with real-world data, practical exercises, and challenging activities

Key Features

  • Understand the fundamentals of tensors, neural networks, and deep learning
  • Discover how to implement and fine-tune deep learning models for real-world datasets
  • Build your experience and confidence with hands-on exercises and activities

Book Description

Getting to grips with tensors, deep learning, and neural networks can be intimidating and confusing for anyone, no matter their experience level. The breadth of information out there, often written at a very high level and aimed at advanced practitioners, can make getting started even more challenging.

If this sounds familiar to you, The TensorFlow Workshop is here to help. Combining clear explanations, realistic examples, and plenty of hands-on practice, it'll quickly get you up and running.

You'll start off with the basics – learning how to load data into TensorFlow, perform tensor operations, and utilize common optimizers and activation functions. As you progress, you'll experiment with different TensorFlow development tools, including TensorBoard, TensorFlow Hub, and Google Colab, before moving on to solve regression and classification problems with sequential models.

Building on this solid foundation, you'll learn how to tune models and work with different types of neural network, getting hands-on with real-world deep learning applications such as text encoding, temperature forecasting, image augmentation, and audio processing.

By the end of this deep learning book, you'll have the skills, knowledge, and confidence to tackle your own ambitious deep learning projects with TensorFlow.

What you will learn

  • Get to grips with TensorFlow's mathematical operations
  • Pre-process a wide variety of tabular, sequential, and image data
  • Understand the purpose and usage of different deep learning layers
  • Perform hyperparameter-tuning to prevent overfitting of training data
  • Use pre-trained models to speed up the development of learning models
  • Generate new data based on existing patterns using generative models

Who this book is for

This TensorFlow book is for anyone who wants to develop their understanding of deep learning and get started building neural networks with TensorFlow. Basic knowledge of Python programming and its libraries, as well as a general understanding of the fundamentals of data science and machine learning, will help you grasp the topics covered in this book more easily.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is The TensorFlow Workshop an online PDF/ePUB?
Yes, you can access The TensorFlow Workshop by Matthew Moocarme, Anthony So, Anthony Maddalone in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Python. We have over one million books available in our catalogue for you to explore.

Information

Year
2021
ISBN
9781800200227
Edition
1

1. Introduction to Machine Learning with TensorFlow

Overview
In this chapter, you will learn how to create, utilize, and apply linear transformations to the fundamental building blocks of programming with TensorFlow: tensors. You will then utilize tensors to understand the complex concepts associated with neural networks, including tensor reshaping, transposition, and multiplication.

Introduction

Machine learning (ML) has permeated various aspects of daily life that are unknown to many. From the recommendations of your daily social feeds to the results of your online searches, they are all powered by machine learning algorithms. These algorithms began in research environments solving niche problems, but as their accessibility broadened, so too have their applications for broader use cases. Researchers and businesses of all types recognize the value of using models to optimize every aspect of their respective operations. Doctors can use machine learning to decide diagnosis and treatment options, retailers can use ML to get the right products to their stores at the right time, and entertainment companies can use ML to provide personalized recommendations to their customers.
In the age of data, machine learning models have proven to be valuable assets to any data-driven company. The large quantities of data available allow powerful and accurate models to be created to complete a variety of tasks, from regression to classification, recommendations to time series analysis, and even generative art, many of which will be covered in this workshop. And all can be built, trained, and deployed with TensorFlow.
The TensorFlow API has a huge amount of functionality that has made it popular among all machine learning practitioners building machine learning models or working with tensors, which are multidimensional numerical arrays. For researchers, TensorFlow is an appropriate choice to create new machine learning applications due to its advanced customization and flexibility. For developers, TensorFlow is an excellent choice of machine learning library due to its ease in terms of deploying models from development to production environments. Combined, TensorFlow's flexibility and ease of deployment make the library a smart choice for many practitioners looking to build performant machine learning models using a variety of different data sources and to replicate the results of that learning in production environments.
This chapter provides a practical introduction to TensorFlow's API. You will learn how to perform mathematical operations pertinent to machine learning that will give you a firm foundation for building performant ML models using TensorFlow. You will first learn basic operations such as how to create variables with the API. Following that, you will learn how to perform linear transformations such as addition before moving on to more advanced tasks, including tensor multiplication.

Implementing Artificial Neural Networks in TensorFlow

The advanced flexibility that TensorFlow offers lends itself well to creating artificial neural networks (ANNs). ANNs are algorithms that are inspired by the connectivity of neurons in the brain and are intended to replicate the process in which humans learn. They consist of layers through which information propagates from the input to the output.
Figure 1.1 shows a visual representation of an ANN. An input layer is on the left-hand side, which, in this example, has two features (X1 and X2). The input layer is connected to the first hidden layer, which has three units. All the data from the previous layer gets passed to each unit in the first hidden layer. The data is then passed to the second hidden layer, which also has three units. Again, the information from each unit of the prior layer is passed to each unit of the second hidden layer. Finally, all the information from the second hidden layer is passed to the output layer, which has one unit, representing a single number for each set of input features.
Figure 1.1: A visual representation of an ANN with two hidden layers
Figure 1.1: A visual representation of an ANN with two hidden layers
ANNs have proven to be successful in learning complex and nonlinear relationships with large, unstructured datasets, such as audio, images, and text data. While the results can be impressive, there is a lot of variability in how ANNs can be configured. For example, the number of layers, the size of each layer, and which nonlinear function should be used are some of the factors that determine the configuration of ANNs. Not only are the classes and functions that TensorFlow provides well-suited to building and training ANNs, but the library also supplies a suite of tools to help visualize and debug ANNs during the training process.
Compared with traditional machine learning algorithms, such as linear and logistic regression, ANNs can outperform them when provided with large amounts of data. ANNs are advantageous since they can be fed unstructured data and feature engineering is not necessarily required. Data pre-processing can be a time-intensive process. Therefore, many practitioners prefer ANNs if there is a large amount of data.
Many companies from all sectors utilize TensorFlow to build ANNs for their applications. Since TensorFlow is backed by Google, the company utilizes the library for much of its research, development, and production of machine learning applications. However, there are many other companies that also use the library. Companies such as Airbnb, Coca-Cola, Uber, and GE Healthcare all utilize the library for a variety of tasks. The use of ANNs is particularly appealing since they can achieve remarkable accuracy if provided with sufficient data and trained appropriately. For example, GE Healthcare uses TensorFlow to build ANNs to identify specific anatomy regardless of orientation from magnetic resonance images to improve speed and acc...

Table of contents