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.

Output

9

And we’re done for the first region of the image!

"Wait, there are nine pixel values coming in, but only ONE value

coming out!"

Good point, you’re absolutely right! Doing a convolution produces an image with a

reduced size. It is easy to see why, if we zoom out back to the full image.

Figure 5.3 - Shrinking images with convolutions

Since the filter gets applied to the gray region, and we’re using an identity filter, it

is fairly straightforward to see it is simply copying the value in the center of the

region. The remaining values are simply multiplied by zero and do not make it to

the sum. But even if they did, it wouldn’t change the fact that the result of one

operation is a single value.

Moving Around

Next, we move the region one step to the right; that is, we change the receptive

field and apply the filter again.

348 | Chapter 5: Convolutions

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

Saved successfully!

Ooh no, something went wrong!