From 447c7070e36c9905da1bbc9a15b4e3c0ad0d983c Mon Sep 17 00:00:00 2001 From: Paul O'Leary McCann Date: Sat, 10 Jul 2021 22:45:25 +0900 Subject: [PATCH] Fix loss Accidentally deleted it --- spacy/pipeline/coref.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/pipeline/coref.py b/spacy/pipeline/coref.py index 3fa59ab72..f2241896e 100644 --- a/spacy/pipeline/coref.py +++ b/spacy/pipeline/coref.py @@ -312,7 +312,7 @@ class CoreferenceResolver(TrainablePipe): log_norm = ops.softmax(cscores, axis=1) grad = log_norm - log_marg gradients.append((grad, cidx)) - total_loss += float(loss) + total_loss += float((grad ** 2).sum()) offset = hi