Skip to main content
. Author manuscript; available in PMC: 2023 Apr 7.
Published in final edited form as: Neurocomputing (Amst). 2022 Jan 21;481:333–356. doi: 10.1016/j.neucom.2022.01.014
layer layer setting
F.relu(self.conv1(x)) self.conv1 = nn.Conv2d(1, 6, 5)
F.max pool2d(x, 2, 2)
F.relu(self.conv2(x)) self.conv2 = nn.Conv2d(6, 16, 5)
x.view(−1, 16*4)
F.relu(self.fc1(x)) self.fc1 = nn.Linear(16*4*4, 120)
x= F.relu(self.fc2(x)) self.fc2 = nn.Linear(120, 84)
x = self.fc3(x) self.fc3 = nn.Linear(84, 10)
F.log softmax(x, dim=1)