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

torch.Size([5, 3, 3, 3])

Its shape indicates it produced five filters for each one of the three input channels

(15 filters in total), and each filter is 3x3 pixels.

fig = sbs_cnn2.visualize_filters('conv1')

Figure 6.12 - Visualizing filters for conv1 layer

For the second convolutional layer, conv2, we get:

model_cnn2.conv2.weight.shape

Model Training | 443

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

Saved successfully!

Ooh no, something went wrong!