Book Image

Deep Learning with PyTorch Quick Start Guide

By : David Julian
Book Image

Deep Learning with PyTorch Quick Start Guide

By: David Julian

Overview of this book

PyTorch is extremely powerful and yet easy to learn. It provides advanced features, such as supporting multiprocessor, distributed, and parallel computation. This book is an excellent entry point for those wanting to explore deep learning with PyTorch to harness its power. This book will introduce you to the PyTorch deep learning library and teach you how to train deep learning models without any hassle. We will set up the deep learning environment using PyTorch, and then train and deploy different types of deep learning models, such as CNN, RNN, and autoencoders. You will learn how to optimize models by tuning hyperparameters and how to use PyTorch in multiprocessor and distributed environments. We will discuss long short-term memory network (LSTMs) and build a language model to predict text. By the end of this book, you will be familiar with PyTorch's capabilities and be able to utilize the library to train your neural networks with relative ease.
Table of Contents (8 chapters)

Hyper-parameters and multilayered networks

Now that you understand the process of building, training, and testing models, you will see that expanding these simple networks to increase performance is relatively straightforward. You will find that nearly all models we build consist, essentially, of the following six steps:

  1. Import data and create iterable data-loader objects for the training and test sets
  2. Build and instantiate a model class
  3. Instantiate a loss class
  4. Instantiate an optimizer class
  5. Train the model
  6. Test the model

Of course, once we complete these steps, we will want to improve our models by adjusting a set of hyper-parameters and repeating the steps. It should be mentioned that although we generally consider hyper-parameters things that are specifically set by a human, the setting of these hyper-parameters can be partially automated, as we shall see in the case of...