Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/clab/dynet
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Matthews committed Apr 4, 2018
2 parents 0c23251 + 348ca39 commit 857144a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/rnnlm/lstmlm-auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ def minibatch_lm_loss(self, sents):
loss_exp, mb_words = lm.minibatch_lm_loss(valid_minibatch)
dev_loss += loss_exp.scalar_value()
dev_words += mb_words
dev_time = time.time() - dev_start
print("nll=%.4f, ppl=%.4f, words=%r, time=%.4f, word_per_sec=%.4f" % (
dev_loss / dev_words, math.exp(dev_loss / dev_words), dev_words,
train_time, all_words / train_time))
dev_time, dev_words / dev_time))

# Compute loss for one training minibatch.
minibatch = [next(random_training_instance)
Expand All @@ -124,4 +125,3 @@ def minibatch_lm_loss(self, sents):
if cur_epoch != epoch:
print("epoch %r finished" % cur_epoch)
epoch = cur_epoch

0 comments on commit 857144a

Please sign in to comment.