Skip to content

Commit

Permalink
Fix the perplexity value
Browse files Browse the repository at this point in the history
  • Loading branch information
emedvedev committed Sep 28, 2017
1 parent 235225e commit 74d2dfd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions aocr/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ def train(self):
step_time, loss = 0.0, 0.0

# Print statistics for the previous epoch.
perplexity = math.exp(loss) if loss < 300 else float('inf')
logging.info("Global step %d. Time: %.3f, loss: %f, perplexity: %.2f."
% (self.sess.run(self.global_step), step_time, loss, perplexity))
# Save checkpoint and reset timer and loss.
Expand Down

0 comments on commit 74d2dfd

Please sign in to comment.