Skip to content

Conversation

@sanghyuk-choi
Copy link
Contributor

This PR fixed coverage_attn bugs which has been discussed on #2013.
Actual codes are slightly differ from it due to considering inference(non teacher-forcing) stage. (See comment)
https://github.com/Sanghyuk-Choi/OpenNMT-py/blob/coverage_fix/onmt/decoders/decoder.py#L364-L365
I've tested the code working properly with dummy dataset as it described on the original paper.

Also, This PR includes _build_source_tokens on translation.py, since src_raw = None causes error when --attn_debug = True.

@vince62s
Copy link
Member

thank you. Were you also able to check the copy attention mechanism with this new v3 version ?

@sanghyuk-choi
Copy link
Contributor Author

yes, I've checked the coverage mechanism with the copy mechanism. it worked well.

@vince62s vince62s merged commit b430e24 into OpenNMT:master Dec 15, 2022
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