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.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix division by zero when there are zero-length spans in MismatchedEm…
…bedder. (#4615) * Implment MattG's fix for NaN gradients in MismatchedEmbedder. Fix `clamp_min` on embeddings. Implment MattG's fix for NaN gradients in MismatchedEmbedder. * Fix NaN gradients caused by weird tokens in MismatchedEmbedder. Fixed division by zero error when there are zero-length spans in the input to a mismatched embedder. * Add changelog message. * Re-run `black` to get code formatting right. * combine fixed sections after merging with master Co-authored-by: Matt Gardner <mattg@allenai.org>
- Loading branch information
1 parent
be97943
commit 711afaa
Showing
3 changed files
with
39 additions
and
2 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
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