Skip to content

[Feature Request]: Adding Categorical Focal Loss #259

@Frightera

Description

@Frightera

System information.

TensorFlow version (you are using): 2.11
Are you willing to contribute it (Yes/No) : Yes

Describe the feature and the current behavior/state.

Currently, Keras provides built-in implementation of Binary Focal Crossentropy. However, it does not provide a built-in implementation of the Categorical Focal Loss.

Related SO questions:
https://stackoverflow.com/questions/56293964/categorical-focal-loss-on-keras
https://stackoverflow.com/questions/65875860/how-to-use-categorial-focal-loss-for-one-hot-encoding-with-keras
https://stackoverflow.com/questions/57807175/use-of-1-a-weight-in-categorical-focal-loss
https://stackoverflow.com/questions/70459884/can-sigmoidfocalcrossentropy-in-tensorflow-tf-addons-be-used-in-multiclass-cla

Some repositories:
https://github.com/umbertogriffo/focal-loss-keras
https://github.com/artemmavrin/focal-loss

Will this change the current api? How?
Yes, this will change the current API by adding a new built-in loss function to Keras.

Contributing

  • Do you want to contribute a PR? (yes/no): Yes

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions