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

loss needs masking for padding labels? #2

Open
cmxcn opened this issue Aug 9, 2020 · 1 comment
Open

loss needs masking for padding labels? #2

cmxcn opened this issue Aug 9, 2020 · 1 comment

Comments

@cmxcn
Copy link

cmxcn commented Aug 9, 2020

Hi Fajie,
I have a question regarding the loss in https://github.com/fajieyuan/nextitnet/blob/master/generator_recsys.py

users' histories have different length, so padding zeros will be needed in input data. And for the loss calcutaion, we need to skip those padding parts, right? But it seems the code doesn't take that into account. Any thoughts about this? Thanks in advance.

@yuan2961634811
Copy link

Hi it has no impact, you can also mask zero padding which is faster but the accuracy should be more or less the same

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