February 2018
Intermediate to advanced
262 pages
6h 59m
English
For this example, let's build our own architecture from scratch. Our network architecture will contain a combination of different layers, namely:
Let's look at a pictorial representation of the architecture we are going to implement:

Let's implement this architecture in PyTorch and then walk through what each individual layer does:
class Net(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 10, kernel_size=5) self.conv2 = nn.Conv2d(10, 20, kernel_size=5) self.conv2_drop = nn.Dropout2d() self.fc1 = nn.Linear(320, 50) ...