Book Image

Hands-On Deep Learning with Apache Spark

By : Guglielmo Iozzia
Book Image

Hands-On Deep Learning with Apache Spark

By: Guglielmo Iozzia

Overview of this book

Deep learning is a subset of machine learning where datasets with several layers of complexity can be processed. Hands-On Deep Learning with Apache Spark addresses the sheer complexity of technical and analytical parts and the speed at which deep learning solutions can be implemented on Apache Spark. The book starts with the fundamentals of Apache Spark and deep learning. You will set up Spark for deep learning, learn principles of distributed modeling, and understand different types of neural nets. You will then implement deep learning models, such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), and long short-term memory (LSTM) on Spark. As you progress through the book, you will gain hands-on experience of what it takes to understand the complex datasets you are dealing with. During the course of this book, you will use popular deep learning frameworks, such as TensorFlow, Deeplearning4j, and Keras to train your distributed models. By the end of this book, you'll have gained experience with the implementation of your models on a variety of use cases.
Table of Contents (19 chapters)
Appendix A: Functional Programming in Scala
Appendix B: Image Data Preparation for Spark

Evaluation techniques with DL4J

At training time and before deploying a MNN, it is important to know the accuracy of the model and understand its performance. In the previous chapter, we learned that at the end of a training phase, the model can be saved in a ZIP archive. From there, it is possible to run it and test it implementing a custom UI, like that shown in Figure 8.1 (it has been implemented using the JavaFX features; the example code is part of the source code that's bundled with this book). But more significant strategies can be utilized to perform an evaluation. DL4J provides an API that can be used to evaluate the performance of both binary and multi-class classifiers.

This first section and its subsections cover all the details of doing evaluation for classification (DL4J and Spark), while the next section provides an overview of other evaluation strategies that...