mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-30 01:50:03 +03:00
Add comment why we moved finish_update
to a separate loop
This commit is contained in:
parent
6357d62ca2
commit
ef709de8ca
|
@ -1168,6 +1168,9 @@ class Language:
|
|||
examples,
|
||||
):
|
||||
eg.predicted = doc
|
||||
# Only finish the update after all component updates are done. Some
|
||||
# components may share weights (such as tok2vec) and we only want
|
||||
# to apply weight updates after all gradients are accumulated.
|
||||
for name, proc in self.pipeline:
|
||||
if (
|
||||
name not in exclude
|
||||
|
|
Loading…
Reference in New Issue
Block a user