You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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: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?The text was updated successfully, but these errors were encountered: