forked from emanjavacas/pie
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(improvement/AttentionalDecoder.predict_max) Avoid computation on rea…
…ched EOS for prediction (See emanjavacas#73) The current prediction time is quite slow, we agree that there might be room for improvement. After having a good look at it, it seemed clear that we were computing on items that technically did not need to continue to be computed upon (string that reach EOS). I propose here my refactor of the predict_max function that stop computing over elements that reached EOS. There is probably still room for improvement here. For a group of 19 sentences over 100 iterations Average tagging time with default: 0.556127781867981 s Median tagging time with default: 0.5420029163360596 Total tagging time with default: 55.612778186798096 s For a group of 19 sentences over 100 iterations Average tagging time with new: 0.4061899709701538 s Median tagging time with new: 0.40130531787872314 Total tagging time with new: 40.61899709701538 s - 27 % time for the whole tagging (lemma only)
- Loading branch information
1 parent
230e0e6
commit 720389e
Showing
2 changed files
with
64 additions
and
12 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