Learn how to train neural networks in a robust way. In this chapter, you will use object-oriented programming to define PyTorch datasets and models and refresh your knowledge of training and evaluating neural networks. You will also get familiar with different optimizers and, finally, get to grips with various techniques that help mitigate the problems of unstable gradients so ubiquitous in neural nets training.
Train neural networks to solve image classification tasks. In this chapter, you will learn how to handle image data in PyTorch and get to grips with convolutional neural networks (CNNs). You will practice training and evaluating an image classifier while learning about how to improve the model performance with data augmentation.
Build and train recurrent neural networks (RNNs) for processing sequential data such as time series, text, or audio. You will learn about the two most popular recurrent architectures, Long-Short Term Memory (LSTM) and Gated Recurrent Unit (GRU) networks, as well as how to prepare sequential data for model training. You will practice your skills by training and evaluating a recurrent model for predicting electricity consumption.
Build multi-input and multi-output models, demonstrating how they can handle tasks requiring more than one input or generating multiple outputs. You will explore how to design and train these models using PyTorch and delve into the crucial topic of loss weighting in multi-output models. This involves understanding how to balance the importance of different tasks when training a model to perform multiple tasks simultaneously.