Thank you very much. I have got it working.
At the moment, my loss function (nn.BCEWithLogitsLoss) is stucking at 0.3132 …


Is the lowest possible value of nn.BCEWithLogitsLoss a zero value?


Would you comment on what could have been going wrong with the fact that the loss will not decrease from 0.3132?


At the moment, I use the BCEWithLogitsLoss() to train with the positive labels only. Is it okay to use such loss function in this way?  For example,  at the moment, all of my targets also have value “1.0” (float). I have converted them from boolean value, i.e.,  if the target value is “True”, then it is converted to 1.0, otherwise  0.0.


I guess that the reason for having loss value 0.313 is because all of the value from my model output is   “1.0”… (it is representing a correlation matrix). I guess that the fact that it has the value of 0.3132 because torch.sigmoid (1.0) is about  0.7. Then, log of (0.7) is  - 0.3132…


The reason for my model output to take value 1 is because it is representing a correlation matrix where I have normalized the output features from my neural network, and perform vector multiplication to get the correlation matrix. However, this seems to put a limitation on how far the BCEwithLogisticLoss will progress.


However, if I did not normalize the output features, I will have a correlation matrix with very high value (1e19). Then, the  BCEwithLogisticLoss will have a very l large value such as 7x 10^12…
Could you recommend a good way to handle this situation?