Since the target_classes for the unknown class is always self.num_classes, this means that target_classes_onehot will always be full of zeros. No matter what is the ground truth or what is the predicted class confidences, this code will make the target of the output logits to zero.
Can anyone explain where I am going wrong? I am not using fed_loss.
Namaste,
This is regarding function loss_nc_labels
Whatever computed till line 183 is not used for further computation at all. Then in line 186 the variable
target_classes_onehot
is defined as follows:Since the
target_classes
for the unknown class is alwaysself.num_classes
, this means thattarget_classes_onehot
will always be full of zeros. No matter what is the ground truth or what is the predicted class confidences, this code will make the target of the output logits to zero.Can anyone explain where I am going wrong? I am not using fed_loss.
Thanks