wangpeiyi9979 / ie-bert-cnn Goto Github PK
View Code? Open in Web Editor NEW一个关于百度2019语言与智能技术竞赛信息抽取 (http://lic2019.ccf.org.cn/kg) 模型, 模型采用BERT+CNN。DEMO地址 https://github.com/Wangpeiyi9979/InformationExtractionDemo
一个关于百度2019语言与智能技术竞赛信息抽取 (http://lic2019.ccf.org.cn/kg) 模型, 模型采用BERT+CNN。DEMO地址 https://github.com/Wangpeiyi9979/InformationExtractionDemo
遇到错误 烦来请教,请问您知道原因吗,谢谢!
Traceback (most recent call last):
File "helpData.py", line 382, in
dataHelper.process_data()
File "helpData.py", line 377, in process_data
metrics.judge_data_quality(self.opt)
File "/home/github/KNOWLEDGE/IE_BERT_CNN/metrics.py", line 340, in judge_data_quality
train_npy_data = np.load(opt.npy_data_root+'train/relations.npy')
File "/home/anaconda3/lib/python3.7/site-packages/numpy/lib/npyio.py", line 453, in load
pickle_kwargs=pickle_kwargs)
File "/home/anaconda3/lib/python3.7/site-packages/numpy/lib/format.py", line 722, in read_array
raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False
您好,作者!
执行python main.py train报错:
File "F:\Skill\Code\RELATION\IE-Bert-CNN-master\models\BERT_MUL_CNN.py", line 112, in forward
sequence_output, _ = self.bertForToken.bert(batch_data, token_type_ids=None, attention_mask=batch_masks, output_all_encoded_layers=False)
AttributeError: 'NoneType' object has no attribute 'bert'
请问有没有解决办法?
你好:
请问方便提供一下“2019语言与智能技术竞赛信息抽取”比赛的数据么?
非常非常感谢!
会不会出现比较多的情况,比如,实体不全(北京大学,但抽取出北京大)或者过长(北京,但北京大)呢?
As the title, please!
这里面BERT是用来训练词向量吗 CNN做特征提取?
感觉您的工作非常有意义,想学习一下,看您代码中至少有两个文件都
import pytorch_pretrained_bert
然后报错找不到这个文件或模块,请问能提供下这个文件吗?
谢谢
Traceback (most recent call last):
File "helpData.py", line 383, in
dataHelper.process_data()
File "helpData.py", line 370, in process_data
self.get_sens_and_tags_and_entsRel(self.origin_train_data, case=0)
File "helpData.py", line 348, in get_sens_and_tags_and_entsRel
ent_rel = np.array(ent_rel)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (173045,) + inhomogeneous part.
准确率是用pre除以rel吗
执行python main.py train报错:
File "F:\Skill\Code\RELATION\IE-Bert-CNN-master\models\BERT_MUL_CNN.py", line 112, in forward
sequence_output, _ = self.bertForToken.bert(batch_data, token_type_ids=None, attention_mask=batch_masks, output_all_encoded_layers=False)
AttributeError: 'NoneType' object has no attribute 'bert'
请问有没有解决办法?
s1, e1, s2, e2 = positions
type_obj = torch.zeros(e1-s1+1).long()
type_sbj = torch.ones(e2-s2+1).long()
if e1 < s2:
m_s = e1+1
m_e = s2-1
else:
m_s = e2+1
m_e = s1-1
type_mid = torch.ones(m_e-m_s+1).long() * 2
if self.opt.use_gpu:
type_obj = type_obj.cuda()
type_sbj = type_sbj.cuda()
type_mid = type_mid.cuda()
obj_vecs = sen_matrix[s1:e1+1,:] + self.type_emb(type_obj)
sbj_vecs = sen_matrix[s2:e2+1,:] + self.type_emb(type_sbj)
mid_vecs = sen_matrix[m_s:m_e+1,:] + self.type_emb(type_mid)
请问下这个mid_vecs 是啥?
您好,运行模型训练时候,出现这个错误,望大神指导如何解决?
谢谢!
请问测试集有带答案的吗,可以提供一下吗
作者您好,请问您的bert_config.json放在哪里,是放在bert-base-chinese.tar.gz压缩包里面吗?
你好,readme提到的0.81结果,指的是线上还是线下呀
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.