This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add options for focal loss Add focal loss to deal with class imbalance * Fix some typing problems * Update util.py * Update util.py * Update util.py * Fix too long lines * Fix keyword argument alert * Update util.py * Update util.py * Fix a problem focal loss not activated * Add test for focal loss gamma * Fix some problem with decimal precision problems * Add focal loss alpha test * Update util_test.py * Update util.py * Update util_test.py * Address some pylint and mypy problems * Update util.py * Update util.py * Update util.py * Update util.py * Update util_test.py * Update util_test.py It was in the wrong place. Sorry. * restore not-callable after torch.tensor() * Update util_test.py For more clear cross_entropy formulation * Update util.py Combine everything into `weights` and avoid reference to local variables later. * Update util_test.py Add `@flaky` also to token-average tests. * Update util.py Avoid involving `gamma` or `alpha` in average. * Update util_test.py * Update util_test.py More tolerance to token average so the change it complaint < 1/1000.
- Loading branch information
1 parent
c22ed57
commit ebe9113
Showing
2 changed files
with
163 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters