x = x.view(-1, 320)
x = self.relu(self.fc1(x))
x = self.relu(self.fc2(x))
return self.softmax(x)
model = Net()
if cuda == True:
model.cuda()
After Change
def forward(self, x):
x = F.relu(F.max_pool2d(self.conv1(x), 2))
x = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x)), 2))
x = x.view(-1, 320)
x = F.relu(self.fc1(x))
x = F.dropout(x)
x = F.relu(self.fc2(x))
return F.log_softmax(x)
model = Net()
if args.cuda:
model.cuda()