Skip to content

Commit

Permalink
bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
oadams committed Oct 13, 2018
1 parent 0926356 commit 056d090
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions persephone/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ 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)
assert test_per == test_ler
with open(os.path.join(hyps_dir, "test_per"), "w",
encoding=ENCODING) as per_f:
print("LER: %f" % (test_ler), file=per_f)
Expand Down Expand Up @@ -408,8 +408,8 @@ def train(self, early_stopping_steps: int = 10, min_epochs: int = 30,

train_ler_total += ler
else:
raise PersephoneError("No training data was provided."
" Check your batch generation.")
raise PersephoneException("No training data was provided."
" Check your batch generation.")

feed_dict = {self.batch_x: valid_x,
self.batch_x_lens: valid_x_lens,
Expand Down

0 comments on commit 056d090

Please sign in to comment.