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

Added early stopping capability with multibleu.perl (extra commits removed) #19

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kelvinxu
Copy link

Notes:
It assumed utf8 encoding meant chinese character based bleu, which might not be right for other languages.

@kelvinxu kelvinxu changed the title Added early stopping capability with multibleu.perl Added early stopping capability with multibleu.perl (extra commits removed) Oct 21, 2014
@@ -336,6 +343,14 @@ def main(self):
self.step % self.state['hookFreq'] == 0 and \
self.hooks:
[fn() for fn in self.hooks]

if self.state['bleu_val_frequency'] is not None and \
Copy link

Choose a reason for hiding this comment

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

This is not good: Groundhog's main_loop should keep being task agnostic. Can you call you BLUE score computation with the standard validation callback?

Copy link
Author

Choose a reason for hiding this comment

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

I agree this is not ideal. But initially I thought it'd be nice to both track the standard cross entropy in the validation call back + compute bleu (occasionally) so we can compare how well we are optimizing both. Do you think we should have both in one validation call?

Copy link

Choose a reason for hiding this comment

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

I think it makes sense, as both are validation costs. Alternatively you can do bleu-related things using the hook mechanism (which is currently used to print samples).

Copy link
Author

Choose a reason for hiding this comment

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

Alright. I'm gonna implement a normal validation function using cross entropy, since that seems to be missing. Might be interesting to see how well it correlates with BLEU.

Kelvin

Copy link

Choose a reason for hiding this comment

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

Nice! But if just moved the code that calls BLEU computation from main_loop into the validation callback, we could merge this pull request.

Copy link
Author

Choose a reason for hiding this comment

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

I see, I'll move this by the end of the week.

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