Book Image

Deep Learning with PyTorch Lightning

By : Kunal Sawarkar
3.5 (2)
Book Image

Deep Learning with PyTorch Lightning

3.5 (2)
By: Kunal Sawarkar

Overview of this book

Building and implementing deep learning (DL) is becoming a key skill for those who want to be at the forefront of progress.But with so much information and complex study materials out there, getting started with DL can feel quite overwhelming. Written by an AI thought leader, Deep Learning with PyTorch Lightning helps researchers build their first DL models quickly and easily without getting stuck on the complexities. With its help, you’ll be able to maximize productivity for DL projects while ensuring full flexibility – from model formulation to implementation. Throughout this book, you’ll learn how to configure PyTorch Lightning on a cloud platform, understand the architectural components, and explore how they are configured to build various industry solutions. You’ll build a neural network architecture, deploy an application from scratch, and see how you can expand it based on your specific needs, beyond what the framework can provide. In the later chapters, you’ll also learn how to implement capabilities to build and train various models like Convolutional Neural Nets (CNN), Natural Language Processing (NLP), Time Series, Self-Supervised Learning, Semi-Supervised Learning, Generative Adversarial Network (GAN) using PyTorch Lightning. By the end of this book, you’ll be able to build and deploy DL models with confidence.
Table of Contents (15 chapters)
1
Section 1: Kickstarting with PyTorch Lightning
6
Section 2: Solving using PyTorch Lightning
11
Section 3: Advanced Topics

What this book covers

Chapter 1, PyTorch Lightning Adventure, will start with a brief history of Deep Learning and why PyTorch is the most preferred framework of the community today. We will also see what PyTorch Lightning is, how it is built, and how it differs from PyTorch. We will cover the module structure of PyTorch Lightning and how it makes research more feasible with users putting less effort into engineering and more into modelling.

Chapter 2, Getting off the Ground with the First Deep Learning Model, focuses on how to get started with building models using PyTorch Lightning. As examples, we will build multiple models, ranging from a very simple Multilayer Perceptron (MLP) to a real-life image recognition model using CNN.

Chapter 3, Transfer Learning Using Pre-Trained Models, mainly focuses on how to customize the models built using pre-trained architecture to achieve great results without large training budgets or time for different datasets. We will walk you through the steps of customizing models using pre-trained models for images and NLP.

Chapter 4, Ready-to-Cook Models from Lightning Flash , mainly focuses on PyTorch Lightning Flash – a state-of-the-art (SOTA) model architecture library. It includes most of the common algorithms or frameworks out of the box, thereby improving the productivity of data scientists by a huge margin for benchmarking & experimentation. This chapter will share various Flash models for video (video classification) and audio (automatic speech recognition) tasks.

Chapter 5, Time Series Models, mainly focuses on the working of time series models, with PyTorch implementation, along with step-by-step working and in-detail examples from basic to advanced time series techniques, such as (Recurrent Neural Networks) RNN and Long Short Term Memory (LSTM) models, along with real-world use cases.

Chapter 6, Deep Generative Models, focuses on the step-by-step, in-detail working and implementation of generative types of DL models, such as Generative Adversarial Networks (GANs), where it will be used to generate new non-existent images.

Chapter 7, Semi-Supervised Learning, mainly focuses on how semi-supervised models work, and how they can be implemented with PyTorch Lightning. We will also cover, in detail, working examples and implementation from basic to advanced semi-supervised models using PyTorch Lightning to handle label propagation and image caption generation using a combination of CNNs and RNNs.

Chapter 8, Self-Supervised Learning, mainly focuses on a new area of Self-Supervised Learning which can work on unlabeled data and explain how self-supervised models can be implemented with PyTorch Lightning. We will also cover working examples of contrastive learning and some techniques like SimCLR architecture.

Chapter 9, Deploying and Scoring Models, will cover, in detail, techniques and ways to deploy a DL model natively as well as in inter-operable formats such as ONNX. It will also cover, in detail, techniques and ways to perform model scoring on massive volumes of data.

Chapter 10, Scaling and Managing Training, will take a nuanced view of the challenges of training a model at scale and managing the training. It will describe some of the common pitfalls and tips and tricks on how to avoid them. It will also describe how to set up your experiments, how to make model training resilient and how to use the hardware to improve training efficiency, among other things.