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

发现的问题 #9

Open
jingyonglin opened this issue Sep 27, 2020 · 0 comments
Open

发现的问题 #9

jingyonglin opened this issue Sep 27, 2020 · 0 comments

Comments

@jingyonglin
Copy link

  1. readme中说 那些pretrained 文件放在 base-uncased.
    需要在base.py 中改掉 config 里的路径base-chinese

  2. 给的cnews,如果默认 gbk则不能读入,需要 在open(raw_data_path,'r')中加入,encoding='utf-8' 。这个应该是本地默认编码问题,不大

  3. 运行train步骤,load预训练权重会提示
    在 bert_for_multi_class.py", line 11
    init_weights() takes 1 positional argument but 2 were given
    找了一会,应该是 把self.apply(self.init_weights) 改为 self.apply(self._init_weights)
    不过这样也还是没有用到预训练权重bin文件,默认还是用的未训练的权重
    把self.apply(self.init_weights) 注释掉,也可以略过加载预训练权重部分,不会报错

暂时发现如上这些

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

1 participant