hanjiale / hcrp Goto Github PK
View Code? Open in Web Editor NEWCode of paper Exploring Task Difficulty for Few-Shot Relation Extraction. https://arxiv.org/abs/2109.05473
Code of paper Exploring Task Difficulty for Few-Shot Relation Extraction. https://arxiv.org/abs/2109.05473
Hello, thanks for your interesting work. However, I encountered some problems with reproducing results on the validation set. I did not modify the parameters in the code and just run 'python train.py'. The results I obtained on the validation set 'val_wiki.json' and the 5-way 1-shot setting, which should be the FewRel 1.0, were just about 84%. There is a great gap between my reproducing results and your provided results "90.9%". Thus, I want to verify
Looking forward to your answer, thanks!
Hi @hanjiale,
Thank you very much for releasing the source code of your great work.
I see your source code is very clear and easy to follow. I only wonder about calculating the CE loss at this line.
If possible, Could you please explain why we need to get the min value of logits and then get the max value on N+1 values? As I think we can only simply get the max value on N values...
I am looking forward to hearing from you. Many thanks!
请问对比RPCL的可视化是怎么实现的,需要保存什么样的数据?
作者您好! 感谢您出色的实验,这里有一个有关模型推理的问题:
您的模型实现中,模型推理时需要传入rel_text
,即关系类型(及其描述),fewRel的测试集中,support set并没有给出每个support instance的关系类型,想请问一下,您在测试集上做推理时,是如何处理support set对应的关系类型的呢?
# in model.py
def forward(self, support, query, rel_text, N, K, total_Q, is_eval=False):
"""
:param support: Inputs of the support set. (B*N*K)
:param query: Inputs of the query set. (B*total_Q)
:param rel_text: Inputs of the relation description. (B*N)
:param N: Num of classes
:param K: Num of instances for each class in the support set
:param total_Q: Num of instances in the query set
:param is_eval:
:return: logits, pred, logits_proto, labels_proto, sim_scalar
"""
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.