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

关于encoder用bert替换 #24

Open
VinnyHu opened this issue Aug 18, 2020 · 9 comments
Open

关于encoder用bert替换 #24

VinnyHu opened this issue Aug 18, 2020 · 9 comments

Comments

@VinnyHu
Copy link

VinnyHu commented Aug 18, 2020

您好,请问下您能不能将实验中把BiLSTM,换成Bert的代码也开源下?谢谢!

@nanguoshun
Copy link
Owner

@VinnyHu 谢谢关注,我们最近在赶deadline,后续整理后以后会开源出来,如果着急可以参考https://github.com/hongwang600/DocRed/blob/master/models/bert.py

@VinnyHu
Copy link
Author

VinnyHu commented Aug 19, 2020

@VinnyHu 谢谢关注,我们最近在赶deadline,后续整理后以后会开源出来,如果着急可以参考https://github.com/hongwang600/DocRed/blob/master/models/bert.py

好的,谢谢您的回复!!!

@VinnyHu
Copy link
Author

VinnyHu commented Aug 23, 2020

@VinnyHu 谢谢关注,我们最近在赶deadline,后续整理后以后会开源出来,如果着急可以参考https://github.com/hongwang600/DocRed/blob/master/models/bert.py

您好,我又看到您代码里面
self.ner_emb = nn.Embedding(13, config.entity_type_size, padding_idx=0)
ner在原来的DocRE数据集里面是7种类型,您这里13种,请问您是又自己有新的标注了嘛?

@VinnyHu
Copy link
Author

VinnyHu commented Aug 23, 2020

@VinnyHu 谢谢关注,我们最近在赶deadline,后续整理后以后会开源出来,如果着急可以参考https://github.com/hongwang600/DocRed/blob/master/models/bert.py

您好,这两天一直都在学习您的工作,对您代码里面StructInduction 模块 forward里面的代码对照着原文中的(3)-(8)的公式看,实在是看的不太懂。
还有就是forward里面的output看来在后续的代码中并没有实际用到,您有时间的话,能不能给个注释版的 对照下原文中的(3)-(8)的公式呢?非常感谢!

@nanguoshun
Copy link
Owner

nanguoshun commented Oct 29, 2020 via email

@qiunlp
Copy link

qiunlp commented Oct 29, 2020

用bert替换后,运行epoch 0 | step 1500 |错误,请问什么原因?
'........code/models/reasoner.py", line 69, in forward
res.as_strided(tmp.size(), [res.stride(0), res.size(2) + 1]).copy_(tmp)
RuntimeError: setStorage: sizes [80, 80], strides [6400, 81], and storage offset 0 requiring a storage size of 512000 are out of bounds for storage with numel 6400

@nanguoshun
Copy link
Owner

Hi @qiunlp 抱歉,这个问题我一直来得及fix,你可以尝试用不同batch_size,或者换个random seed来临时解决这个问题

@qiunlp
Copy link

qiunlp commented Oct 29, 2020

好的,谢谢!我试试

@LawsonAbs
Copy link

用bert替换后,运行epoch 0 | step 1500 |错误,请问什么原因? '........code/models/reasoner.py", line 69, in forward res.as_strided(tmp.size(), [res.stride(0), res.size(2) + 1]).copy_(tmp) RuntimeError: setStorage: sizes [80, 80], strides [6400, 81], and storage offset 0 requiring a storage size of 512000 are out of bounds for storage with numel 6400

meet again! sad!

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

4 participants