nlpscott / bert-chinese-classification-task Goto Github PK
View Code? Open in Web Editor NEWbert中文分类实践
bert中文分类实践
你好,请问这个数据在其他模型(textCNN, lstm, eg.)上的效果有没有测试过呢?谢谢
Hi,
我想问下 max_sequence_length = 256 在中文里是不是指 256个词?也就是每个样本最多能读入接近500~600个字?
Tks
model.bert.load_state_dict(torch.load(args.init_checkpoint, map_location='cpu'))
RuntimeError: Error(s) in loading state_dict for BertModel:
Missing key(s) in state_dict:
有什么解决办法吗?谢谢!
Originally posted by @wutonghua in #5 (comment)
您好,非常感谢您的代码:
我在调试的时候,下载了谷歌的chinese_base压缩包,解压后,用https://github.com/huggingface/pytorch-pretrained-BERT/tree/1de35b624b9d7998feb4d518e4f7e8e53abac4e1的方法转化成bin。或者是用https://github.com/NLPScott/bert-Chinese-classification-task/issues/13这里提供的chinese版本,都会遇到模型载入的错误。
RuntimeError: Error(s) in loading state_dict for BertModel:
Missing key(s) in state_dict: "embeddings.word_embeddings.weight",
可以发现是模型的名字对应错误,应该是名字有了调整,这里我解决不了,您能帮忙看看吗?
请问pytorch_model.bin可以去哪里下载
但是1080ti应该符合要求才对阿
what dose it mean? Thanks a lot!
您好,pytorch.bin在哪啊
只保存了evaluation的结果,没有保存模型
您好,我运行了您的代码,上面显示如图报错,我修改了export路径,但好像还是没把与训练模型读进去,您知道原因吗
您好,很感谢您提供代码,本人水平有限,在执行这一步时:
model.bert.load_state_dict(torch.load(args.init_checkpoint, map_location='cpu'))
遇到以下错误:
RuntimeError: Error(s) in loading state_dict for BertModel: Missing key(s) in state_dict: "embeddings.word_embeddings.weight. ...."
请问这是为什么呢。
from optimization import BERTAdam
这行的BERTAdam,
谢谢
你好,我看你在做分类的时候,读入训练数据按照gbk格式来读取,请问这里设定编码格式是必须的么,我的训练数据格式就是utf-8格式的,读取我直接按照默认读取,并没有设置什么编码格式,而且程序也没有问题,但是训练结果并不好,这种现象是和编码有联系么?谢谢
pytorch_model.bin指的是什么,下载下来的文件只有.ckpt文件
@NLPScott
ModuleNotFoundError: No module named 'optimization'
^-^
run_classifier_word.py: error: the following arguments are required: --data_dir, --bert_config_file, --task_name, --vocab_file, --output_dir
能否把optimization和pytorch的checkpoint这个也放进来,我用最新的bert-pytorch master的代码转的checkpoint报错:
model.bert.load_state_dict(torch.load(args.init_checkpoint, map_location='cpu'))
RuntimeError: Error(s) in loading state_dict for BertModel:
Missing key(s) in state_dict:
查了很久都没有发现怎么做QA的例子呢 谢谢
这里的BERT预训练模型是怎样得到的?
或是
直接用BERT做分类任务,没有根据Masked LM和Next sentence 预训练?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.