ptrblck:

nn.BCELoss expects a tensor containing probabilities, so you should replace the last F.log_sigmoid in your model with F.sigmoid .
Could you change it and try to fit your data again?


I changed it. The loss is now lower but still the accuracy is too low stuck at 9% compared to 83% with random forest on the same data.
I also tried changing the learning rate to see if it works but still it wiggles around the same accuracy.