mirror of
https://github.com/explosion/spaCy.git
synced 2025-09-18 18:12:45 +03:00
Fix backprop
Training seems to actually run now!
This commit is contained in:
parent
2486b8ad4d
commit
d22acee4f7
|
@ -210,7 +210,7 @@ class CoreferenceResolver(TrainablePipe):
|
||||||
preds, backprop = self.model.begin_update(inputs)
|
preds, backprop = self.model.begin_update(inputs)
|
||||||
score_matrix, mention_idx = preds
|
score_matrix, mention_idx = preds
|
||||||
loss, d_scores = self.get_loss(examples, score_matrix, mention_idx)
|
loss, d_scores = self.get_loss(examples, score_matrix, mention_idx)
|
||||||
backprop(d_scores)
|
backprop((d_scores, mention_idx))
|
||||||
|
|
||||||
if sgd is not None:
|
if sgd is not None:
|
||||||
self.finish_update(sgd)
|
self.finish_update(sgd)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user