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

Target sequence truncated in report (translator.py) #269

Closed
pierregodard opened this issue Jan 17, 2018 · 0 comments
Closed

Target sequence truncated in report (translator.py) #269

pierregodard opened this issue Jan 17, 2018 · 0 comments

Comments

@pierregodard
Copy link
Collaborator

When force decoding in a seq2seq model (config file similar to forced.yaml), it appears that the following line (https://github.com/neulab/xnmt/blob/master/xnmt/translator.py#L130)

trg_words = [self.trg_vocab[w] for w in output_actions[1:]]

truncates the target sequence from the first unit. Correcting to output_actions[0:] solves my problem (I am dumping attention matrices in a plain text format), but I wonder if there is another report scenario in which the truncation is needed?

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