Book Image

PyTorch Deep Learning Hands-On

By : Sherin Thomas, Sudhanshu Passi
Book Image

PyTorch Deep Learning Hands-On

By: Sherin Thomas, Sudhanshu Passi

Overview of this book

PyTorch Deep Learning Hands-On is a book for engineers who want a fast-paced guide to doing deep learning work with PyTorch. It is not an academic textbook and does not try to teach deep learning principles. The book will help you most if you want to get your hands dirty and put PyTorch to work quickly. PyTorch Deep Learning Hands-On shows how to implement the major deep learning architectures in PyTorch. It covers neural networks, computer vision, CNNs, natural language processing (RNN), GANs, and reinforcement learning. You will also build deep learning workflows with the PyTorch framework, migrate models built in Python to highly efficient TorchScript, and deploy to production using the most sophisticated available tools. Each chapter focuses on a different area of deep learning. Chapters start with a refresher on how the model works, before sharing the code you need to implement it in PyTorch. This book is ideal if you want to rapidly add PyTorch to your deep learning toolset.
Table of Contents (11 chapters)
10
Index

Training and validation

We have reached the final step in the deep learning workflow, although the workflow actually ends with the deployment of the deep model to production, which we'll cover in Chapter 8, PyTorch to Production. After all the preprocessing and model building, now we have to train the network, test the accuracy, and validate the reliability. Most of the existing code implementation that we see in the open source world (even in this book) uses a straightforward approach, where we explicitly write each line that is required for training, testing, and validation in favor of readability, since specific tools that can avoid the boilerplates increase the learning curve, especially for newcomers. It became clear that a tool that could avoid the boilerplate would be a lifesaver for programmers who play with neural networks on a day-to-day basis. So, the PyTorch community built not one but two tools: torchnet and ignite. This session is only about ignite, since that is...