EDIT:
First issue resolved by:

Changing out dimension to 1 and returning return F.sigmoid(x)

Changing the loss function to torch.nn.BCELoss()

During training use prediction = (net(X).data).float() # probabilities



17_PyTorch_Logistic_Regression.jpg802×869 106 KB