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 a334cf9 commit 5943ae4Copy full SHA for 5943ae4
stanza/models/coref/model.py
@@ -576,11 +576,12 @@ def train(self, log=False):
576
577
if (res.zeros_y == 1).any():
578
zeros_preds = res.zeros_scores[res.zeros_y != -100].reshape(-1, 2)
579
- labels = res.zeros_y[res.zeros_y != -100].reshape(-1, 2)
+ labels = res.zeros_y[res.zeros_y != -100].reshape(-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
583
- zeros_loss = self._zeros_loss(zeros_preds, labels.float())
+ # print(labels.float())
584
+ zeros_loss = self._zeros_loss(zeros_preds, labels.long())
585
else:
586
zeros_loss = 0.0 # don't apply loss if there's nothing to learn
587
0 commit comments