lonePatient / BERT-chinese-text-classification-pytorch

This repo contains a PyTorch implementation of a pretrained BERT model for text classification.
99 stars 19 forks source link

deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly) RuntimeError: storage has wrong size: expected 0 got 2359296 #4

Open JohnParken opened 5 years ago

JohnParken commented 5 years ago

image

JohnParken commented 5 years ago

楼主对这各错误有了解吗?

lonePatient commented 5 years ago

@JohnParken 加载模型出错,不知道是否pytorch版本有关?或者pytorch_transformer 我的pytorch版本是1.10好像,你的模型是改版本代码训练出来的吗 ?还是老版本训练的

JohnParken commented 5 years ago

可能是我的torch版本问题,我用的1.0好像,我换成1.1试一下,模型是直接用你的代码跑出来的。

On Sat, Aug 31, 2019 at 4:29 PM lonePatinet notifications@github.com<mailto:notifications@github.com> wrote:

@JohnParkenhttps://github.com/JohnParken 加载模型出错,不知道是否pytorch版本有关?或者pytorch_transformer 我的pytorch版本是1.10好像,你的模型是改版本代码训练出来的吗 ?还是老版本训练的

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/lonePatient/BERT-chinese-text-classification-pytorch/issues/4?email_source=notifications&email_token=AE7NESQWVXA6HYZWFYDB4MTQHITXBA5CNFSM4ISPPLMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5TIHBI#issuecomment-526812037, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AE7NESX2HI63D6VWWN5CYWDQHITXBANCNFSM4ISPPLMA.