Book Image

Apache Spark Deep Learning Cookbook

By : Ahmed Sherif, Amrith Ravindra
Book Image

Apache Spark Deep Learning Cookbook

By: Ahmed Sherif, Amrith Ravindra

Overview of this book

Organizations these days need to integrate popular big data tools such as Apache Spark with highly efficient deep learning libraries if they’re looking to gain faster and more powerful insights from their data. With this book, you’ll discover over 80 recipes to help you train fast, enterprise-grade, deep learning models on Apache Spark. Each recipe addresses a specific problem, and offers a proven, best-practice solution to difficulties encountered while implementing various deep learning algorithms in a distributed environment. The book follows a systematic approach, featuring a balance of theory and tips with best practice solutions to assist you with training different types of neural networks such as convolutional neural networks (CNNs) and recurrent neural networks (RNNs). You’ll also have access to code written in TensorFlow and Keras that you can run on Spark to solve a variety of deep learning problems in computer vision and natural language processing (NLP), or tweak to tackle other problems encountered in deep learning. By the end of this book, you'll have the skills you need to train and deploy state-of-the-art deep learning models on Apache Spark.
Table of Contents (21 chapters)
Title Page
Copyright and Credits
Packt Upsell
Foreword
Contributors
Preface
Index

Understanding transfer learning


The rest of this chapter will involve transfer learning techniques; therefore, we will spend this section explaining how transfer learning works within our architecture.

Getting ready

There are no dependencies required for this section.

How to do it...

This section walks through the steps for how transfer learning works:

  1. Identify a pre-trained model that will be used as the training methodology that will be transferred to our chosen task. In our case, the task will be in identifying images of Messi and Ronaldo.
  2. There are several available pre-trained models that can be used. The most popular ones are the following:
    1. Xception
    2. InceptionV3
    3. ResNet50
    4. VGG16
    5. VGG19
  3. The features from the pre-trained convolutional neural network are extracted and saved for a certain set of images over several layers of filtering and pooling.
  4. The final layer for the pre-trained convolutional neural network is substituted with the specific features that we are looking to classify based on our dataset...