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

perplexity aggregation scheme #1190

Merged
merged 2 commits into from
May 29, 2017
Merged

Conversation

rizar
Copy link
Contributor

@rizar rizar commented May 25, 2017

This PR does two nice things: (a) improves the test of the Mean aggregation scheme to check what actually happens when batch sizes are different (b) adds and tests a Perplexity scheme, which in fact was the original motivation for the aggregation schemes 2 years ago..

@dmitriy-serdyuk , can you please review this?

variable = tensor.exp(-log_likelihood / n_examples)
variable.tag.aggregation_scheme = Perplexity(log_likelihood, n_examples)
# There is no good default name for the output variable,
# so we don't try set any.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not name it 'perplexity'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I thought and it would be not nice to return always the same name. But maybe it's an okay default. Will change.

@rizar
Copy link
Contributor Author

rizar commented May 29, 2017

Your only comment was addressed, can you please look again?

@dmitriy-serdyuk
Copy link
Contributor

Ok, LGTM.

@dmitriy-serdyuk dmitriy-serdyuk merged commit 5255bc6 into mila-iqia:master May 29, 2017
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

Successfully merging this pull request may close these issues.

2 participants