Sanjayvarma11:

out = torch.sigmoid(activations)


Should you be using a nn.Linear layer here instead of sigmoid activation?
I see that CrossEntropyLoss being used. So, simply using the logit outputs from the linear should be fine.