2 Deep Learning with PyTorch

 

This chapter covers

  • What are PyTorch tensors and how to conduct operations on them
  • Preparing data in PyTorch for deep learning
  • Building and training deep neural networks with PyTorch
  • Binary and multi-category classifications with deep learning
  • Creating a validation set to determine when to stop training

In this book, we’ll use deep neural networks to generate a wide range of content, including text, images, shapes, music, and more. I assume you possess a prior familiarity with the inner workings of machine learning (ML), and specifically, a foundational understanding of artificial neural networks. Throughout this chapter, I’ll refresh your memory on a few key concepts such as loss functions, activation functions, optimizers, and the learning rate, which constitute indispensable elements in the development and training of deep neural networks. Should there be any gaps in your knowledge pertaining to these concepts, it is strongly encouraged that you rectify them before progressing further with projects in this book.[1]

2.1 Data Types in PyTorch

 
 
 
 

2.1.1 Create PyTorch Tensors

 
 
 

2.1.2 Index and Slice PyTorch Tensors

 
 
 

2.1.3 PyTorch Tensor Shapes

 
 
 

2.1.4 Mathematical Operations on PyTorch Tensors

 
 
 

2.2 An End-to-End Deep Learning Project with PyTorch

 
 
 
 

2.2.1 Deep learning in PyTorch: A high-level overview.

 

2.2.2 Preprocessing Data

 

2.3 Binary Classification

 
 

2.3.1 Creating Batches

 
 
 
 

2.3.2 Building and Training A Binary Classification Model

 

2.3.3 Testing the Binary Classification Model

 
 

2.4 Multi-Category Classification

 
 

2.4.1 Validation Set and Early Stopping

 

2.4.2 Build and Train a Multi-Category Classification Model

 

2.5 Summary

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest