From ca65677d58f7f105e1e4662a6bda746c6ad997e0 Mon Sep 17 00:00:00 2001 From: William Date: Mon, 27 May 2019 14:19:15 +0200 Subject: [PATCH] change to 3x3 conv filters, for ease of reading dimension in net --- beginner_source/blitz/neural_networks_tutorial.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beginner_source/blitz/neural_networks_tutorial.py b/beginner_source/blitz/neural_networks_tutorial.py index 05113e8ac17..04b099a3066 100644 --- a/beginner_source/blitz/neural_networks_tutorial.py +++ b/beginner_source/blitz/neural_networks_tutorial.py @@ -46,12 +46,12 @@ class Net(nn.Module): def __init__(self): super(Net, self).__init__() - # 1 input image channel, 6 output channels, 5x5 square convolution + # 1 input image channel, 6 output channels, 3x3 square convolution # kernel - self.conv1 = nn.Conv2d(1, 6, 5) - self.conv2 = nn.Conv2d(6, 16, 5) + self.conv1 = nn.Conv2d(1, 6, 3) + self.conv2 = nn.Conv2d(6, 16, 3) # an affine operation: y = Wx + b - self.fc1 = nn.Linear(16 * 5 * 5, 120) + self.fc1 = nn.Linear(16 * 6 * 6, 120) # 6*6 from image dimension self.fc2 = nn.Linear(120, 84) self.fc3 = nn.Linear(84, 10)