lonePatient / NeZha_Chinese_PyTorch

NEZHA: Neural Contextualized Representation for Chinese Language Understanding

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

checkpoint转pytorch问题

Fan9 opened this issue · comments

有几个问题请教下
1、公司网络无法下载某云盘资源,如何把huawei提供的checkpoint转成pytorch的bin文件。
2、转好后是否可以直接用transformers包加载使用

用convert_nezha_original_tf_checkpoint_to_pytorch.py已经转成功了,之前transformers版本低报了错。关于第二个问题请指教

@Fan9 只能用当前脚本进行加载,目前transformers还没收录nezha模型代码。

想请教一下,在用的时候遇到这个问题,要怎么解决?
ValueError: Couldn't find 'checkpoint' file or checkpoints in given directory D:\juypter_notebook\NeZha_Chinese_PyTorch-main\pretrained_models
检查路径没有问题

@xiaotong-y 少一个checkpoint文件,tf转torch需要,可参考google提供的bert文件内容