Skip to content

Commit

Permalink
Removed PER reference in training log.
Browse files Browse the repository at this point in the history
  • Loading branch information
oadams committed Oct 13, 2018
1 parent 4cdcd13 commit 4f4ea60
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions persephone/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,11 @@ def eval(self, restore_model_path: Optional[str]=None) -> None:
for ref in refs:
print(" ".join(ref), file=refs_f)

assert test_per == test_ler
test_per = utils.batch_per(hyps, refs)
with open(os.path.join(hyps_dir, "test_per"), "w",
encoding=ENCODING) as per_f:
print("Test PER: %f, tf LER: %f" % (test_per, test_ler), file=per_f)
print("LER: %f" % (test_ler), file=per_f)

def output_best_scores(self, best_epoch_str: str) -> None:
"""Output best scores to the filesystem"""
Expand Down Expand Up @@ -436,7 +437,7 @@ def train(self, early_stopping_steps: int = 10, min_epochs: int = 30,

valid_per = utils.batch_per(hyps, refs)

epoch_str = "Epoch %d. Training LER: %f, validation LER: %f, validation PER: %f" % (
epoch_str = "Epoch %d. Training LER: %f, validation LER: %f" % (
epoch, (train_ler_total / (batch_i + 1)), valid_ler, valid_per)
print(epoch_str, flush=True, file=out_file)
if best_epoch_str is None:
Expand Down

0 comments on commit 4f4ea60

Please sign in to comment.