Skip to content
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

week3_lm/homework.ipynb does averaging incorrectly and refers to rnn_lm instead of window_lm #10

Closed
dniku opened this issue Sep 30, 2018 · 1 comment

Comments

@dniku
Copy link

dniku commented Sep 30, 2018

It contains the following code:

assert np.mean(train_history[:10]) > np.mean(train_history[-10:]), "The model didn't converge."

This is incorrect because train_history is a list of pairs (i, loss). A correct way is:

assert np.mean(train_history[:10], axis=0)[1] > np.mean(train_history[-10:], axis=0)[1], "The model didn't converge."

Also, a couple of lines further it refers to rnn_lm instead of window_lm.

@justheuristic
Copy link
Contributor

Thank you, wise scholar of the ways of spaghetti. We fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants