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

使用性问题 #3

Closed
aopolin-lv opened this issue Jul 5, 2021 · 7 comments
Closed

使用性问题 #3

aopolin-lv opened this issue Jul 5, 2021 · 7 comments

Comments

@aopolin-lv
Copy link

您好,首先恭喜这份工作被ACL2021录用,融入字形和拼音的预训练必然会对中文nlp任务带来一定的提升。
同样,我也希望能在除了论文中提及的其他任务中使用ChineseBert,请问有没有集成类似于BERT的API可以调用,
如:
tokenizer = Tokenizer.from_pretrain([ChineseBert])
config = Config.from_pretrain([ChineseBert])
model = Bert.from_pretrain([ChineseBert])
或者,有没有instruction说明一下调用方式

@zijunsun
Copy link
Collaborator

zijunsun commented Jul 5, 2021

有的,我们的模型已上传到hunggingface model hub, 详细可以查看readme的quick tour部分,里面有快速调用教程。

@aopolin-lv
Copy link
Author

请问你们有遇到过以下warning嘛?
UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.) return torch.max_pool1d(input, kernel_size, stride, padding, dilation, ceil_mode)
torch == 1.9
如果遇到的话需要怎么解决?

@zijunsun
Copy link
Collaborator

zijunsun commented Jul 5, 2021

可能是torch的版本不同导致的,我们使用的是1.5版本的pytorch,不过通常warning没什么大问题,可以忽略。

@aopolin-lv
Copy link
Author

请问字体.npy文件是什么?
我看到你们之前有一篇nips的工作glyce里面有用到10种字体,当时的font是以.otf和.ttf存储,这两者之间有什么联系嘛?
你们有对添加多种字体做对比实验,添加哪几种比较好嘛?
如果我想再加入多个字体,该怎么添加?

@zijunsun
Copy link
Collaborator

zijunsun commented Jul 7, 2021

字体npy就是文字从图像转成的矩阵,glyce之前选用10种字体主要是因为他关注字体的演变,从金文小篆演变到简体。
本论文的核心是捕捉图像和拼音信息,因此直接选用三种简体。
这个字体不支持添加,也没有必要,因为简体来说,不同的写法还是比较相似的。

@aopolin-lv
Copy link
Author

请问这个从图像转成矩阵的方式可以公开嘛,目前是想做包括繁体在内的研究。

@YuxianMeng
Copy link

YuxianMeng commented Jul 13, 2021

请问这个从图像转成矩阵的方式可以公开嘛,目前是想做包括繁体在内的研究。

.otf.ttf都是生成矢量图用的字体文件,可以用来生成任意大小的图像。我们使用python保存了固定像素大小的矩阵方便后续的调用。具体numpy如何保存可以参考glyce的源码

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