We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2de94a commit 61bc248Copy full SHA for 61bc248
stanza/models/coref/model.py
@@ -575,8 +575,8 @@ def train(self, log=False):
575
c_loss = self._coref_criterion(res.coref_scores, res.coref_y)
576
577
if (res.zeros_y == 1).any():
578
- zeros_preds = res.zeros_scores[res.zeros_y != -100].reshape(-1)
579
- labels = res.zeros_y[res.zeros_y != -100].reshape(-1)
+ zeros_preds = res.zeros_scores[res.zeros_y != -100].reshape(1, -1)
+ labels = res.zeros_y[res.zeros_y != -100].reshape(1, -1)
580
# reweight such that the zeros and nonzeros count for equal weighting
581
# that is, artifically balance the "number of samples" by weighting between
582
# them equally
0 commit comments