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

Question about validation #1

Open
itsfrank98 opened this issue Oct 19, 2021 · 0 comments
Open

Question about validation #1

itsfrank98 opened this issue Oct 19, 2021 · 0 comments

Comments

@itsfrank98
Copy link

Hi, I am doing a project similar to this and I stumbled upon your code. Looking at the validate function, I don't understand the following:

for (batch, (inp, tar)) in enumerate(dataset_val):    
        tar_inp = tar[:, :-1] # <startseq> hi im moein
        tar_real = tar[:, 1:] # hi im moein <endseq>

Why for tar_real you take all the tokens except the last one? Since the sequences are padded, shouldn't you be looking for the last non zero token instead?

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

1 participant