22.02.2024 Views

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 6.4 - Convolution over each channel

We can also look at it in code if you prefer:

regions = np.array([[[[5, 0, 8],

[1, 9, 5],

[6, 0, 2]],

[[0, 5, 4],

[8, 1, 9],

[4, 8, 1]],

[[4, 2, 0],

[6, 3, 0],

[5, 2, 8]]]])

regions.shape

Output

(1, 3, 3, 3)

426 | Chapter 6: Rock, Paper, Scissors

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

Saved successfully!

Ooh no, something went wrong!