Hi, all I am trying to implement the one-vs-all classification scheme without using softmax. I have 10 classes. So, I did 10 binary classifications, but it doesn’t work properly and I don’t know why? I will be grateful and thankful if someone can help me with this. Here is a snapshot:
for i in range(num_classes):
                binary_cross_entropy =  nn.BCELoss() #
                tgt_class_label = torch.eq(labels, i).float()
                print(f"before_sigmoid: {pred_out[:,i]}")
                print(f"normalized: {pred[:,i]}")
                print(f"True Labels: {tgt_class_label}")
                print(tgt_class_label)
                class_loss = binary_cross_entropy(pred[:,i],tgt_class_label)
                Loss+=class_loss