- 🎓 PKU(master's degree)
- 🔭 Natural Language Processing
- ❤ Program language: Python C++ JavaScript
- 🔭 Labtory: Advanced Data & Signal Processing (ADSP@PKUSZ)
yeeeqichen / kgqa Goto Github PK
View Code? Open in Web Editor NEW基于知识图谱的问答系统设计与实现,附带一个可视化的demo
基于知识图谱的问答系统设计与实现,附带一个可视化的demo
请问有相关的论文资源可以参考吗,代码注释比较少,感觉有些难看懂。
按照楼主给的链接去下载数据集,没有看到知识图谱的数据集,只看到了问答数据集
想请教一下如何调高kge的训练效果?参数我没改动过,但是无论如何个各个指标也达不到0.5以上,更别说向您那样达到0.9了
RuntimeError: Error(s) in loading state_dict for QuestionAnswerModel:
Missing key(s) in state_dict: "relation_predictor.attention_key.weight", "relation_predictor.attention_key.bias", "relation_predictor.attention_query.weight", "relation_predictor.attention_query.bias", "relation_predictor.attention_value.weight", "relation_predictor.attention_value.bias", "relation_predictor.feed_forward.weight", "relation_predictor.feed_forward.bias".
Unexpected key(s) in state_dict: "relation_predictor.attention_w.weight", "relation_predictor.attention_w.bias".
按照博主的方式运行train.py,到了下一步运行router.py就出现以上的问题,求助下博主
博主我不太明白,为什么训练的时候要加入negative_samples呀
你好,我用kb.txt去初始化训练和测试用的五个文件:然后执行的时候如下:
python3 train_rotate.py
Input Files Path : ./data/MetaQA/
The toolkit is importing datasets.
The total of relations is 9.
The total of entities is #43234.
The total of train triples is 106066.
Input Files Path : ./data/MetaQA/
The total of test triples is 13258.
The total of valid triples is 13259.
Segmentation fault
我发现kb.txt里面有的三元组是重复的,所以我手动去除了删除了的三元组,然后打乱数据集并按照8:1:1的比例划分为训练集、验证集和测试集,我在entity2id.txt和relation2id.txt用了'\t'分隔,在剩余几个个文件之间用了空格,想请教一下大概会是什么原因导致的"Segmentation fault"?
我执行KGQA-SYStem中的train.py的时候显示如下: KG_embed.ent_embeddings.weight : torch.Size([43234, 2048]),KG_embed.rel_embeddings.weight : torch.Size([9, 1024])
他告诉我在执行 File "train.py", line 162, in train的 train_loss.backward()的时候出现了cuda错误:File "/home/stone/miniconda3/envs/python35/lib/python3.7/site-packages/torch/tensor.py", line 245, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/home/stone/miniconda3/envs/python35/lib/python3.7/site-packages/torch/autograd/init.py", line 147, in backward
allow_unreachable=True, accumulate_grad=True) # allow_unreachable flag
RuntimeError: CUDA error: unknown error
想请教一下您这是什么问题呢,是我的模型的size对不上还是环境没有配好呢?
您好,我将kb.txt去重打乱后按8:1:1划分为训练集、验证集、测试集后使用rotatR(1000epoch),transE(2000epoch)分别进行了训练(no type constraint),表现完全不如您在notes.txt最后记录的(我只有在把train当test进行测试时数据才能达到notes里的水平),请问您做了什么额外处理吗?
下面是transE的数据:
no type constraint results:
metric: MRR MR hit@10 hit@3 hit@1
l(raw): 0.059048 4849.178711 0.113640 0.058467 0.031442
r(raw): 0.187911 3171.404785 0.360683 0.216125 0.104582
averaged(raw): 0.123479 4010.291748 0.237161 0.137296 0.068012
l(filter): 0.142708 4566.729980 0.207516 0.160428 0.108774
r(filter): 0.238894 3169.721924 0.377976 0.260293 0.171732
averaged(filter): 0.190801 3868.226074 0.292746 0.210361 0.140253
0.292746
0.2927459180355072
train2id.txt
entity2id.txt
relation2id.txt
test2id.txt
valid2id.txt
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.