focal-loss
focal-loss copied to clipboard
SparseCategoricalFocalLoss: ignore class?
Hi,
TensorFlow's implementation of categorical cross-entropy accepts a parameter called ignore_class
(see here) since v 2.10. In principle, it can be useful for NER tasks. It would be nice if such a parameter appeared in the calculation of focal loss, so an apple-to-apple comparison can be carried out.