mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-19 20:52:23 +03:00
Fix loss
The loss was being returned as a single element array, which caused training to die when it attempted to turn it into JSON.
This commit is contained in:
parent
ff3fed06cf
commit
e1b4a85bb9
|
@ -322,7 +322,7 @@ class CoreferenceResolver(TrainablePipe):
|
|||
|
||||
# scalar loss
|
||||
# loss += xp.sum(log_norm - log_marg)
|
||||
loss += self.loss.get_loss(cscores, top_gscores)
|
||||
loss += float(self.loss.get_loss(cscores, top_gscores))
|
||||
offset += ll
|
||||
return loss, gradients
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user