NLP_pytorch_project
NLP_pytorch_project copied to clipboard
Can't load weights for './bert_pretrain/pytorch_model.bin'
请问这里的pytorch_model.bin是指什么,从您那下载下来的pytorch_model.bin大小只有0b
在您的config.py中发现有model_path = './bert_pretrain/pytorch_model.bin',但是文件中并没有这个
在您的config.py中发现有model_path = './bert_pretrain/pytorch_model.bin',但是文件中并没有这个
对呀 你需要下载 这个模型要三四百兆 所以 没上传
在您的config.py中发现有model_path = './bert_pretrain/pytorch_model.bin',但是文件中并没有这个
对呀 你需要下载 这个模型要三四百兆 所以 没上传
请问从哪里下载啊,是bert-base-uncased这个吗,这里面没有pytorch_model.bin呀
终于跑起来了 bert的预训练模型可以这样下载
from transformers import BertForMaskedLM
model = BertForMaskedLM.from_pretrained("bert-base-cased")
修改config.py的
model_path ='bert-base-cased'
终于跑起来了 bert的预训练模型可以这样下载
from transformers import BertForMaskedLM model = BertForMaskedLM.from_pretrained("bert-base-cased")
修改config.py的
model_path ='bert-base-cased'
你好,从官网下载的模型没有pytorch_model.bin,修改ckpt的文件为pytorch_model.bin仍然跑不起来,想问下你当时是怎么跑起来的
终于跑起来了 bert的预训练模型可以这样下载
from transformers import BertForMaskedLM model = BertForMaskedLM.from_pretrained("bert-base-cased")
修改config.py的
model_path ='bert-base-cased'
你好,从官网下载的模型没有pytorch_model.bin,修改ckpt的文件为pytorch_model.bin仍然跑不起来,想问下你当时是怎么跑起来的
把你报错信息贴出来看看
OK 我大概知道啥意思了。 如果我没猜错的话,你的torch版本很低。至少低于1.5
没有啊,1.8.1
那可能就是模型本身转化有问题。 去下面链接 https://huggingface.co/hfl/chinese-bert-wwm-ext/tree/main 下载 pytorch_model.bin config.json vocab.txt 这几个文件。 然后放在一个文件里。 BertMode.from_pretrained('文件名') 就ok了。
OK,谢谢啦
---Original--- From: @.> Date: Mon, Sep 27, 2021 09:27 AM To: @.>; Cc: @.@.>; Subject: Re: [shawroad/NLP_pytorch_project] Can't load weights for './bert_pretrain/pytorch_model.bin' (#31)
那可能就是模型本身转化有问题。 去下面链接 https://huggingface.co/hfl/chinese-bert-wwm-ext/tree/main下载 pytorch_model.bin config.json vocab.txt 这几个文件。 然后放在一个文件里。 BertMode.from_pretrained('文件名') 就ok了。
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.