Hello everyone! I wanted to clarify a doubt I have regarding the vgg16 network. I am currently using the pre-trained vgg16 network for a classification problem with 2 labels. I already have the best weights for tthis problem, using as a criterion the nn.CrossEntropyLoss and I can get a prediction by doing:
outputs = vgg16(net_img)
_, preds = torch.max(outputs.data, 1)

However, my goal is not to have a binary prediction (0 or 1), but the probability and also the cross entropy metric for each class. I wanted to check if what I am doing makes sense.
To get the probability of each class I am doing:
probabilities = torch.sigmoid(outputs)
And to get the cross entropy os each class I am simply using the outputs I already calculated.
Does this make sense? If it helps, I based my work in this tutorial: https://www.kaggle.com/carloalbertobarbano/vgg16-transfer-learning-pytorch 5
Thank you in advance!