class TeacherNet(nn.Module):
def __init__(self):
super(TeacherNet, self).__init__()
self.conv = nn.Conv2d(1, 32, 5)
self.pool = nn.MaxPool2d(5, 5)
self.fc1 = nn.Linear(32 * 4 * 4, 128)
self.fc2 = nn.Linear(128, 10)
def forward(self, x):
x = F.relu(self.conv(x))
x = self.pool(x)
x = x.view(x.size(0), -1)
x = F.relu(self.fc1(x))
x = self.fc2(x)
return x