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

simbert_model.py文件中的117行 #48

Open
singaln opened this issue Dec 7, 2021 · 5 comments
Open

simbert_model.py文件中的117行 #48

singaln opened this issue Dec 7, 2021 · 5 comments

Comments

@singaln
Copy link

singaln commented Dec 7, 2021

您好,在simbert_model.py文件中117行的self.decoder()是哪里来的呢??

@920232796
Copy link
Owner

抱歉,前段时间更新了框架,这块忘记改了,还没测试到,我马上修改一下提交下,多谢指出~

@920232796
Copy link
Owner

提交了,你看看,等有空我再去测试下。

@berrybobo
Copy link

simbert的生成相似句测试可以写下吗,参考苏神的,我遇到问题了,卡住了,十分感谢

@920232796
Copy link
Owner

simbert的生成相似句测试可以写下吗,参考苏神的,我遇到问题了,卡住了,十分感谢

print(self.bert_model.sample_generate(text,
out_max_length=40,
top_k=30, top_p=0.7,
repetition_penalty=1.5,
temperature=1.5, sample_num=8))
生成的句子有呀,哪里卡住了?

@berrybobo
Copy link

simbert的生成相似句测试可以写下吗,参考苏神的,我遇到问题了,卡住了,十分感谢

print(self.bert_model.sample_generate(text, out_max_length=40, top_k=30, top_p=0.7, repetition_penalty=1.5, temperature=1.5, sample_num=8)) 生成的句子有呀,哪里卡住了?

我刚才没看到,我仿着苏神写的,就是用transformer库输入和苏神的不一样,您这里好像是没有用transformer的封装,自己写的,我的问题是在生成时随机采样后原输入与输出concat后不知道该传入bert了,我感觉自己定义bert估计就行了,或者我用下您的方法试下,谢啦

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

3 participants