Reader small image

You're reading from  Mastering Azure Machine Learning

Product typeBook
Published inApr 2020
Reading LevelBeginner
PublisherPackt
ISBN-139781789807554
Edition1st Edition
Languages
Tools
Right arrow
Authors (2):
Christoph Körner
Christoph Körner
author image
Christoph Körner

Christoph Körner previously worked as a cloud solution architect for Microsoft, specializing in Azure-based big data and machine learning solutions, where he was responsible for designing end-to-end machine learning and data science platforms. He currently works for a large cloud provider on highly scalable distributed in-memory database services. Christoph has authored four books: Deep Learning in the Browser for Bleeding Edge Press, as well as Mastering Azure Machine Learning (first edition), Learning Responsive Data Visualization, and Data Visualization with D3 and AngularJS for Packt Publishing.
Read more about Christoph Körner

Kaijisse Waaijer
Kaijisse Waaijer
author image
Kaijisse Waaijer

Kaijisse Waaijer is an experienced technologist specializing in data platforms, machine learning, and the Internet of Things. Kaijisse currently works for Microsoft EMEA as a data platform consultant specializing in data science, machine learning, and big data. She works constantly with customers across multiple industries as their trusted tech advisor, helping them optimize their organizational data to create better outcomes and business insights that drive value using Microsoft technologies. Her true passion lies within the trading systems automation and applying deep learning and neural networks to achieve advanced levels of prediction and automation.
Read more about Kaijisse Waaijer

View More author details
Right arrow

8. Training deep neural networks on Azure

In the previous chapter, we learned how to train and score classical machine learning (ML) models using non-parametric tree-based ensemble methods. While these methods work well on many small and medium-sized datasets with categorical variables, they don't generalize well on large datasets.

In this chapter, we will train complex parametric models using deep learning (DL) for even better generalization with large datasets. This will help you understand which situations Deep Neural Networks (DNNs) perform better in than traditional models.

First, we will give a short and practical overview of why and when DL works well. We will focus more on understanding the general principles and rationale rather than a theoretical approach. This will help you to assess which use cases and datasets have a need for DL and how it works in general.

We will then take a look at the most popular application domain for DL—computer vision...

Introduction to deep learning

DL has revolutionized the ML domain recently and is constantly outperforming classical statistical approaches, and even humans, in various tasks, such as image classification, object detection, segmentation, speech transcription, text translation, text understanding, sales forecasting, and much more. In contrast to classical models, DL models use many millions of parameters, clever weight sharing, optimization techniques, and implicit feature extraction to outperform all previously hand-crafted feature detectors and ML models when trained with enough data.

In this section, we will help you understand why and when DL models make sense for certain domains and datasets. If you are already an expert in DL, feel free to skip this section and go directly to the more practical sections. However, if you are new to DL, I strongly encourage you to stay for this section in order to understand the practical and business need for larger, more capable models, as...

Training a CNN for image classification

Once we have a good understanding of why and when to use DL models, we can start to actually implement one using Azure Machine Learning. We will start with a task that DL performed very well with over the past years, computer vision, or more precisely, image classification. If you feel that this is too easy for you, you can replace the actual training script with any other computer vision technique and follow along with the steps in this section:

  • First, we will power up an Azure Machine Learning compute instance, which serves as our Jupyter Notebook authoring environment. We will first write a training script and execute it in the authoring environment to verify that it works properly, checkpoints the model, and logs the training and validation metrics. We will train the model for a few epochs to validate the setup, the code, and the resulting model.
  • Once this is set up, we will try to improve the algorithm by adding data augmentation...

Summary

In this chapter, we learned when and how to use DL to train an ML model on Azure. We used both compute instance and a GPU cluster from within Azure Machine Learning to train a model using Keras and TensorFlow.

First, we found out that DL works very well on highly structured data with non-obvious relations from the raw input data to the resulting prediction. Good examples are image classification, speech-to-text, or translation. However, we also saw that DL models are parametric models with a large number of parameters and so we often need a large amount of labeled or augmented input data. In contrast to traditional ML approaches, the extra parameters are used to train a fully end-to-end model, also including feature extraction from the raw input data.

Training a CNN using Azure Machine Learning is not difficult. We saw many approaches, from prototyping in Jupyter to augmenting the training data to running the training on a GPU cluster with autoscaling. The difficult part...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Mastering Azure Machine Learning
Published in: Apr 2020Publisher: PacktISBN-13: 9781789807554
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Christoph Körner

Christoph Körner previously worked as a cloud solution architect for Microsoft, specializing in Azure-based big data and machine learning solutions, where he was responsible for designing end-to-end machine learning and data science platforms. He currently works for a large cloud provider on highly scalable distributed in-memory database services. Christoph has authored four books: Deep Learning in the Browser for Bleeding Edge Press, as well as Mastering Azure Machine Learning (first edition), Learning Responsive Data Visualization, and Data Visualization with D3 and AngularJS for Packt Publishing.
Read more about Christoph Körner

author image
Kaijisse Waaijer

Kaijisse Waaijer is an experienced technologist specializing in data platforms, machine learning, and the Internet of Things. Kaijisse currently works for Microsoft EMEA as a data platform consultant specializing in data science, machine learning, and big data. She works constantly with customers across multiple industries as their trusted tech advisor, helping them optimize their organizational data to create better outcomes and business insights that drive value using Microsoft technologies. Her true passion lies within the trading systems automation and applying deep learning and neural networks to achieve advanced levels of prediction and automation.
Read more about Kaijisse Waaijer