the_coder:


def forward(self, x):
    x = F.relu(self.input(x))
    x = F.relu(self.hidden1(x))
    x = self.output(x)
    return F.log_softmax(x,dim=1)




Your code uses a LogSoftmax() in the last layer.
In that case, the loss function you must use will be F.nll_loss(output, y) instead of F.cross_entropy(output, y)