The three binary losses (KR, HingeMargin and HKR) now handle multi-label classification, i.e. they accept y_true and y_pred of shape (batch_size, C) where C is the number of categories. Each category matches with a binary classification problem. The final element-wise loss corresponds to the average of the binary losses for all categories.
Moreover, the three KR formulations (binary, multi-label and multi-class) are similar and are unified in a single function _kr().
The three binary losses (KR, HingeMargin and HKR) now handle multi-label classification, i.e. they accept
y_true
andy_pred
of shape (batch_size, C) where C is the number of categories. Each category matches with a binary classification problem. The final element-wise loss corresponds to the average of the binary losses for all categories.Moreover, the three KR formulations (binary, multi-label and multi-class) are similar and are unified in a single function
_kr()
.