Skip to content

focal loss for categorical (one-hot) encodings #1948

@jadevaibhav

Description

@jadevaibhav

Describe the feature and the current behavior/state.
Currently, sigmoid focal crossentropy provided is implemented for single value labels for binary labels, as it internally uses binary crossentropy for its calculations.

Relevant information

  • Are you willing to contribute it (yes/no): Yes
  • Are you willing to maintain it going forward? (yes/no): Yes
  • Is there a relevant academic paper? (if so, where):
  • Is there already an implementation in another framework? (if so, where):
  • Was it part of tf.contrib? (if so, where): No

Which API type would this fall under (layer, metric, optimizer, etc.)
losses
Who will benefit with this feature?
If you want to implement the the binary classifier in one-hot encoding way, it would be useful.
Any other info.
I am attaching a [colab notebook]:https://colab.research.google.com/drive/1ORlgu9zfntzjsv6oxUgvSBvN4cSxmBEJ?usp=sharing . I would love to discuss this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions