Hi,
I am trying to write a fully working LR example, and I encountered two different issues.
The NN is very simple, with a torch.nn.Linear with two targets and as output and a torch.nn.CrossEntropyLoss() as the loss function.
https://github.com/QuantScientist/Deep-Learning-Boot-Camp/blob/master/day%2002%20PyTORCH%20and%20PyCUDA/PyTorch/17%20%20PyTorch%20Logistic%20Regression.ipynb 187

The first issue is related to ROC_AUC, during training, which seems to be skwed instead of beeing curve-linear. This happens probably because of the way I am calculating the probabilities but I cant seem to get my hands on where is the error.


2.  The second issue is during testing, with the dimentions of the results of running the inference, and the dimentions of the actual expected target  (e.g. 0 or 1) . Cant seem to be able to fix this, see the picture below.

17_PyTorch_Logistic_Regression.jpg1177×711 121 KB

Many thanks,