8000 fixed time and word per sec reported in validation step by YovaKem · Pull Request #1338 · clab/dynet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fixed time and word per sec reported in validation step #1338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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