Skip to content

Commit 61bc248

Browse files
committed
batch
1 parent e2de94a commit 61bc248

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stanza/models/coref/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,8 @@ def train(self, log=False):
575575
c_loss = self._coref_criterion(res.coref_scores, res.coref_y)
576576

577577
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)
578+
zeros_preds = res.zeros_scores[res.zeros_y != -100].reshape(1, -1)
579+
labels = res.zeros_y[res.zeros_y != -100].reshape(1, -1)
580580
# reweight such that the zeros and nonzeros count for equal weighting
581581
# that is, artifically balance the "number of samples" by weighting between
582582
# them equally

0 commit comments

Comments
 (0)