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

what does these two figures mean? #18

Open
bxwldljh opened this issue May 23, 2023 · 1 comment
Open

what does these two figures mean? #18

bxwldljh opened this issue May 23, 2023 · 1 comment

Comments

@bxwldljh
Copy link

bxwldljh commented May 23, 2023

Hi, nice work and I am interested in it. In train.py, there are a few lines of code I do not understand:

m1 = copy.deepcopy(sen_mask)  ##[0,0,0...0,1,1,1,1]
m1.scatter_(1, w_ind, 0)  ##[0,0,0...0,0,1,1,0]
m2 = 1 - m1  ##[1,1,1...1,1,0,0,1]
if dataset=='cpv1':
    m3=m1*18330
else:
    m3 = m1 * 18455  ##[0,0,0...0,0,18455,18455,0]
q2 = q2 * m2.long() + m3.long()

can you tell me what does 18330 and 18455 mean?

@ww01911
Copy link

ww01911 commented Nov 27, 2023

it is the padding_idx of word dictionary, see more in dataset.py

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