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

the role of mask in attention operation #3

Open
Marcovaldong opened this issue Nov 1, 2019 · 2 comments
Open

the role of mask in attention operation #3

Marcovaldong opened this issue Nov 1, 2019 · 2 comments

Comments

@Marcovaldong
Copy link

I am reading torch implementation, your implementation and the pytorch implementation. I found that there are mask in your implementation and torch implementation, but there is no mask in pytorch implementation. Is the role of mask is to get the valid ones? If there is no mask, what will the performance and the result be like?

I am training the pytorch implementation on handwritten dataset, I found that there is a lot of repeat in the decoded result, as below shown. is is the reason that I didn't use mask in the procedure of attention operation?

groundtruth:  the^fragile^nature
prediction:  the^fragile^fragile^fragile^fragile^fragile^fragile^fragile^fragile^fragile^fragi
@Pay20Y
Copy link
Owner

Pay20Y commented Nov 1, 2019

Yes, I did experiments about the mask in feature map and the mask softmax. They are both effective. But I'm not sure is it caused the repeat errors.

@Marcovaldong
Copy link
Author

tks for your reply. I'll check how to append the mask in pytorch implementation.

Pay20Y pushed a commit that referenced this issue Dec 3, 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

No branches or pull requests

2 participants