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

Refactoring decoders/search_strategies #565

Merged
merged 6 commits into from
Jan 30, 2019
Merged

Conversation

armatthews
Copy link
Contributor

This refactors decoders and search_strategies to use new interface calls best_k() and/or sample() instead of relying on the existence of a decoder.calc_log_probs() function.

For certain types of decoders computing the whole (log) distribution is computationally difficult or down right impossible. For example, hierarchical softmax, my morphological stuff, or the RNNG decoder with it's structured output actions.

@armatthews
Copy link
Contributor Author

This also addresses issues 561 and 563.

austinma added 4 commits January 23, 2019 11:55
@philip30
Copy link
Contributor

Hey @armatthews I am not sure if we can also remove the attention_vecs from the attender? I think I was the one who added that and the purpose is to get the last attention score or be used somewhere. As you said, it is better to make these components stateless.

@armatthews armatthews merged commit 0979bb8 into neulab:master Jan 30, 2019
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