NLPScott/bert-Chinese-classification-task

pytorch_model.bin指的是什么,下载下来的文件只有.ckpt文件

FakerYFX opened this issue · 8 comments

pytorch_model.bin指的是什么,下载下来的文件只有.ckpt文件
@NLPScott

我用官网的转换工具把tensorflow的模型转换成pytorch.bin,但是在模型加载的时候报错了
image
@NLPScott

同问 这个文件怎么下载的啊,export看不太懂

同求

同求pytorch_model.bin

from pytorch_pretrained_bert import convert_tf_checkpoint_to_pytorch,使用这个将tf的转换为torch的
convert_tf_checkpoint_to_pytorch.convert_tf_checkpoint_to_pytorch('bert-model/chinese_L-12_H-768_A-12/bert_model.ckpt', 'bert-model/bert_config.json', 'bert-model/pytorch_model.bin')

你就不能把转好的pytorch_model.bin传上去吗,官网tf的跑不了,GCS bucket又要绑定信用卡,这个点了我还没下班,哭了555

你就不能把转好的pytorch_model.bin传上去吗,官网tf的跑不了,GCS bucket又要绑定信用卡,这个点了我还没下班,哭了555

https://github.com/xieyufei1993/Bert-Pytorch-Chinese-TextClassification 参考此处转换