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

Are trg_mask and src_mask correct in dataset script #3

Open
anesh-ml opened this issue Oct 4, 2024 · 2 comments
Open

Are trg_mask and src_mask correct in dataset script #3

anesh-ml opened this issue Oct 4, 2024 · 2 comments

Comments

@anesh-ml
Copy link

anesh-ml commented Oct 4, 2024

in the Bert4Rec_dataset script, I see that trg_mask and src_mask outputs are same. Are they supposed to be same or different. It would be helpful if you could confirm it @vatsalsaglani

@vatsalsaglani
Copy link
Owner

It's been a long time since I worked on this. But as far as I remember here, the transformer treats source and target sequence as one sequence instead of source and target. The masked positions depict the valid positions for attention and the model can learn from the entire sequence.

As this architecture is encoder-only we can use the same masks given we use the same during prediction/inference.

@anesh-ml
Copy link
Author

anesh-ml commented Oct 7, 2024

thanks, the accuracy of the model is stuck around 15%. Does it take lot of training time to improve? @vatsalsaglani

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