ENGLISH

Deep Learning with PyTorch Lightning: Build and train high-performance artificial intelligence and self-supervised models using Python

Book information

Publisher
Packt
Year
2022
ISBN
9781800561618
Language
english
Format
PDF
Filesize
21 MB (22004255 bytes)
Edition
1
Pages
364\364
Time added
2022-08-22 10:03:01

Description

Build, train, deploy, and scale deep learning models quickly and accurately, improving your productivity using the lightweight PyTorch Wrapper Key Features Become well-versed with PyTorch Lightning architecture and learn how it can be implemented in various industry domains Speed up your research using PyTorch Lightning by creating new loss functions, networks, and architectures Train and build new algorithms for massive data using distributed training Book Description PyTorch Lightning lets researchers build their own Deep Learning (DL) models without having to worry about the boilerplate. With the help of this book, you'll be able to maximize productivity for DL projects while ensuring full flexibility from model formulation through to implementation. You'll take a hands-on approach to implementing PyTorch Lightning models to get up to speed in no time. You'll start by learning how to configure PyTorch Lightning on a cloud platform, understand the architectural components, and explore how they are configured to build various industry solutions. Next, you'll build a network and application from scratch and see how you can expand it based on your specific needs, beyond what the framework can provide. The book also demonstrates how to implement out-of-box capabilities to build and train Self-Supervised Learning, semi-supervised learning, and time series models using PyTorch Lightning. As you advance, you'll discover how generative adversarial networks (GANs) work. Finally, you'll work with deployment-ready applications, focusing on faster performance and scaling, model scoring on massive volumes of data, and model debugging. By the end of this PyTorch book, you'll have developed the knowledge and skills necessary to build and deploy your own scalable DL applications using PyTorch Lightning. What you will learn Customize models that are built for different datasets, model architectures, and optimizers Understand how a variety of Deep Learning models from image recognition and time series to GANs, semi-supervised and self-supervised models can be built Use out-of-the-box model architectures and pre-trained models using transfer learning Run and tune DL models in a multi-GPU environment using mixed-mode precisions Explore techniques for model scoring on massive workloads Discover troubleshooting techniques while debugging DL models Who this book is for This deep learning book is for citizen data scientists and expert data scientists transitioning from other frameworks to PyTorch Lightning. This book will also be useful for deep learning researchers who are just getting started with coding for deep learning models using PyTorch Lightning. Working knowledge of Python programming and an intermediate-level understanding of statistics and deep learning fundamentals is expected. Table of Contents PyTorch Lightning Adventure Getting Off the Ground with Your First Deep Learning Model Transfer Learning Using Pre-Trained Models Ready-to- Use Models from Bolts Time Series Models Deep Generative Models Semi-Supervised Learning Self-Supervised Learning Deploying and Scoring Models Scaling and Managing Training Cover Title Page Copyright and Credits Contributors Table of Contents Preface Section 1: Kickstarting with PyTorch Lightning Chapter 1: PyTorch Lightning Adventure What makes PyTorch Lightning so special? The first one…. So many frameworks? PyTorch versus TensorFlow A golden mean – PyTorch Lightning – My Lightning adventure Understanding the key components of PyTorch Lightning DL pipeline PyTorch Lightning abstraction layers Crafting AI applications using PyTorch Lightning Image recognition models Transfer learning NLP Transformer models Lightning Flash Time series models with LSTM Generative Adversarial Networks with Autoencoders Semi-supervised models combining CNN and RNN Self-supervised models for contrastive learning Deploying and scoring models Scaling models and productivity tips Further reading Summary Chapter 2: Getting off the Ground with the First Deep Learning Model Technical requirements Getting started with NNs Why NNs? About the XOR operator MLP architecture Building a Hello World MLP model Importing libraries Preparing the data Configuring the model Training the model Loading the model Making predictions Building our first DL model So, what makes it deep? CNN architecture Building a CNN model for image recognition Importing the packages Collecting the data Preparing the data Building the model Training the model Evaluating the accuracy of the model Model improvement exercises Summary Chapter 3: Transfer Learning Using Pre-Trained Models Technical requirements Getting started with transfer learning An image classifier using a pre-trained ResNet-50 architecture Preparing the data Extracting the dataset Pre-processing the dataset Loading the dataset Building the model Training the model Evaluating the accuracy of the model Text classification using BERT transformers Collecting the data Preparing the dataset Setting up the DataLoader instances Building the model Setting up model training and testing Training the model Evaluating the model Summary Chapter 4: Ready-to-Cook Models from Lightning Flash Technical requirements Getting started with Lightning Flash Flash is as simple as 1-2-3 Video classification using Flash Slow and SlowFast architecture Importing libraries Loading the dataset Configuring the backbone Fine-tuning the model Making predictions using the model Automatic speech recognition using Flash Importing libraries Loading the dataset Configuring the backbone Fine-tuning the model Speech prediction using the model Further learning Summary Section 2: Solving using PyTorch Lightning Chapter 5: Time Series Models Technical requirements Introduction to time series Time series forecasting using deep learning Getting started with time series models Traffic volume forecasting using the LSTM time series model Dataset analysis Feature engineering Creating a custom dataset Configuring the LSTM model using PyTorch Lightning Setting up the optimizer Training the model Measuring the training loss Loading the model A prediction on the test dataset The next steps Summary Chapter 6: Deep Generative Models Technical requirements Getting started with GAN models What is a GAN? Creating new food items using a GAN Loading the dataset Feature engineering utility functions The discriminator model The generator model The generative adversarial model Training the GAN model The model output showing fake images Creating new butterfly species using a GAN GAN training challenges Creating images using DCGAN Summary Chapter 7: Semi-Supervised Learning Technical requirements Getting started with semi-supervised learning Going through the CNN–RNN architecture Generating captions for images Downloading the dataset Assembling the data Training the model Generating the caption Next steps Summary Chapter 8: Self-Supervised Learning Technical requirements Getting started with Self-Supervised Learning So, what does it mean to be Self-Supervised? What is Contrastive Learning? SimCLR architecture How does SimCLR work? SimCLR model for image recognition Collecting the dataset Setting up data augmentation Loading the dataset Training configuration Model training Model evaluation Next steps Summary Section 3: Advanced Topics Chapter 9: Deploying and Scoring Models Technical requirements Deploying and scoring a deep learning model natively The pickle (.PKL) model file format Deploying our deep learning model Saving and loading model checkpoints Deploying and scoring a model using Flask Deploying and scoring inter-portable models What is the ONNX format? Why does it matter? Saving and loading the ONNX model Deploying and scoring the ONNX model using Flask Next steps Further reading Summary Chapter 10: Scaling and Managing Training Technical Requirements Managing training Saving model hyperparameters Efficient debugging Monitoring the training loss using TensorBoard Scaling up training Speeding up model training using a number of workers GPU/TPU training Mixed precision training/16-bit training Controlling training Saving model checkpoints when using the cloud Changing the default behavior of the checkpointing feature Resuming training from a saved checkpoint Saving downloaded and assembled data when using the cloud Further reading Summary Index Other Books You May Enjoy

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

2008 · PDF