Skip to content

[Feature]: Support sigmoid for classification models #11881

@tonyay163

Description

@tonyay163

🚀 The feature, motivation and pitch

Right now, we only support softmax for classification models but sigmoid is equally as prevalent, depending on the usecase. I think the simplest way is just to return the logits and let us handle it ourselves. Alternatively, returning both softmax and sigmoid is probably not too much more computation.

Additional context

See: https://wandb.ai/amanarora/Written-Reports/reports/Understanding-Logits-Sigmoid-Softmax-and-Cross-Entropy-Loss-in-Deep-Learning--Vmlldzo0NDMzNTU3#conclusion

Thus, sigmoid is preferred for binary & multi-label classification problems whereas softmax is preferred for multi-class classification problems where we want the model to “pick a class”.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or requeststaleOver 90 days of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions