Clarify/make consistent expected prediction output shape for different loss functions
Open
@thvasilo is already working on this.
Since May 14, 2025.
0.4.2
- Dominant language
- Python
- Stars
- 452
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
For classification tasks, cross entropy will have a prediction shape with number of columns that's equal to the number of classes. So for binary tasks we have 2 columns in the output, where col2 = 1-col1.
Focal loss instead will produce one column that is the positive score, which carries the same information while being more space-efficient.
We need to inform users and possibly enforce a consistent behavior for num_clases
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.