Hi
I’m training a Fully Connected NN with Pytorch, and the model seems to perform very well. this is the model, and the hyper-parameters:
The Model (I’ve not changed the name to FullyConnectedNetworkClassifier)
image714×756 37.3 KB
As you can see, the output layer has a sigmoid, so my model predicts a probability
The hyper-parameters

The results
image724×397 42.2 KB
I made a terrible mistake. I didn’t realize that the both  dataset’s and unbalanced. The column target has two values, True or False, and, as I said, the unbalancing comes in the form that in both dataset’s the samples with target=False are the 90% (10% of samples with target=True) of the total (both in training and validation)
So my questions:

My model, as it’s, … is it predicting the probability of the True class (target=True), or the False one (target=False)?
How can I parametrize BCELoss with weights? how much should be the magnitud of those weights? What is the in intuition of the weight parameter, exactly?
Could I use BCEWithLogitsLoss to work with my unbalanced dataset’s? what about its weight and pos_weight parameters?

The Pytorch’docs
https://pytorch.org/docs/stable/generated/torch.nn.BCELoss.html#torch.nn.BCELoss
https://pytorch.org/docs/stable/generated/torch.nn.BCEWithLogitsLoss.html#torch.nn.BCEWithLogitsLoss
Best regards and thanks