22.02.2024 Views

Daniel Voigt Godoy - Deep Learning with PyTorch Step-by-Step A Beginner’s Guide-leanpub

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

There are MANY different layers that can be used in PyTorch:

• Convolution Layers

• Pooling Layers

• Padding Layers

• Non-linear Activations

• Normalization Layers

• Recurrent Layers

• Transformer Layers

• Linear Layers

• Dropout Layers

• Sparse Layers (embeddings)

• Vision Layers

• DataParallel Layers (multi-GPU)

• Flatten Layer

So far, we have just used a Linear layer. In the chapters ahead, we’ll use many

others, like convolution, pooling, padding, flatten, dropout, and non-linear

activations.

Putting It All Together

We’ve covered a lot of ground so far, from coding a linear regression in Numpy

using gradient descent to transforming it into a PyTorch model, step-by-step.

It is time to put it all together and organize our code into three fundamental parts,

namely:

• data preparation (not data generation!)

• model configuration

• model training

Let’s tackle these three parts, in order.

Putting It All Together | 115

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!