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, thanks for sharing your code. I noticed a bug that would affect the experimental results.
This line of code below constructs subj_mask and obj_mask according to whether subj_pos or obj_pos is 0. But in DataLoader, shorter sequences are also padded with 0 for their subj_poss and obj_poss. So subj_mask and obj_mask don't mask the padding tokens.
This will affect the following subject and object pooling operations cause the representation vectors for padding tokens are not 0 (for example, a linear transformation would add bias term to these vectors).
Changing it to the following would fix the problem
subj_mask, obj_mask = subj_pos.eq(0).eq(0), obj_pos.eq(0).eq(0) # invert mask
subj_mask = (subj_mask | masks).unsqueeze(2) # logical or with word masks
obj_mask = (obj_mask | masks).unsqueeze(2)
The text was updated successfully, but these errors were encountered:
Hi, thanks for sharing your code. I noticed a bug that would affect the experimental results.
This line of code below constructs
subj_mask
andobj_mask
according to whethersubj_pos
orobj_pos
is 0. But inDataLoader
, shorter sequences are also padded with 0 for theirsubj_pos
s andobj_pos
s. Sosubj_mask
andobj_mask
don't mask the padding tokens.gcn-over-pruned-trees/model/gcn.py
Line 88 in db7c128
This will affect the following subject and object pooling operations cause the representation vectors for padding tokens are not 0 (for example, a linear transformation would add bias term to these vectors).
Changing it to the following would fix the problem
The text was updated successfully, but these errors were encountered: