Implement __sub__
Open
enhancement
good first issue
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 170
- PR merge metrics
- No merged PRs in 30d
Description
Currently one cannot just do `-SomeLoss()`. Of course it could be hacked by doing `(-1) * SomeLoss()`. We want to implement the first syntax via `__sub__`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the SomeLoss implementation and checking the Python operator protocol relevant to unary negation. Confirm the intended behavior and add coverage for applying the requested syntax to a loss object; done means the expression works without requiring multiplication by -1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100