December 2018
Intermediate to advanced
158 pages
3h 58m
English
As you would expect, we can improve this result by adding another convolutional layer. When we are adding multiple layers, it is convenient to bundle each layer into a sequence. It is here that nn.Sequential comes in handy:

We initialize two hidden layers and a fully connected linear output layer. Note the parameters passed to the Conv2d instances and the linear output. As before, we have one input dimension. From this, our convolutional layer outputs 16 feature maps or output channels.
This diagram represents the two-layered convolutional network:
This should make it clear how we calculate the output sizes, ...
Read now
Unlock full access