mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
Print dev score before averaging
This commit is contained in:
parent
be85b7f17f
commit
c57bf6485d
|
@ -172,10 +172,14 @@ def train(Language, gold_tuples, model_dir, dev_loc, n_iter=15, feat_set=u'basic
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("Saving model...")
|
print("Saving model...")
|
||||||
break
|
break
|
||||||
|
dev_uas = score_file(nlp, dev_loc).uas
|
||||||
|
print("Dev before average", dev_uas)
|
||||||
|
|
||||||
nlp.parser.model.end_training()
|
nlp.parser.model.end_training()
|
||||||
print("Saved. Evaluating...")
|
print("Saved. Evaluating...")
|
||||||
return nlp
|
return nlp
|
||||||
|
|
||||||
|
|
||||||
def _train_epoch(nlp, gold_tuples, eg_seen, itn, dev_loc, micro_eval):
|
def _train_epoch(nlp, gold_tuples, eg_seen, itn, dev_loc, micro_eval):
|
||||||
random.shuffle(gold_tuples)
|
random.shuffle(gold_tuples)
|
||||||
loss = 0
|
loss = 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user