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

预处理的mask没有用上? #2

Open
hurricanedjp opened this issue Nov 5, 2019 · 1 comment
Open

预处理的mask没有用上? #2

hurricanedjp opened this issue Nov 5, 2019 · 1 comment

Comments

@hurricanedjp
Copy link

hurricanedjp commented Nov 5, 2019

https://github.com/ZhixiuYe/MLMAN/blob/master/models/MLMAN.py#L63
input_mask = (input['mask'] != 0).float()

这里只取了非零即文本长度的mask,且bool结果都为1,所以原先data_loader里的2,3值没有用上?

https://github.com/ZhixiuYe/MLMAN/blob/master/models/data_loader.py#L172
self.data_mask[i][j] = 2

@ZhixiuYe
Copy link
Owner

是的,这里的self.data_mask[i][j] = 1,2,3只是为了标定每个词相对于两个entitiy的位置,如果做piece-wise pooling的话是需要用到这些mask的(之前一些方法是这么做的)。
我这里并不是用的这种方式,我只需要区别mask和非mask。

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