Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于lable.shape的问题 #7

Closed
PTXXXXXZ opened this issue Jul 25, 2022 · 2 comments
Closed

关于lable.shape的问题 #7

PTXXXXXZ opened this issue Jul 25, 2022 · 2 comments

Comments

@PTXXXXXZ
Copy link

想问lable的shape可以设置吗,是一直都是[128,14541]吗,如果想要其成为[128, ]该如何操作呢

@PTXXXXXZ
Copy link
Author

head_label = torch.zeros(len(data), self.num_ent)
tail_label = torch.zeros(len(data), self.num_ent)
请问label设置成[128,14541]的话,KBAT的解码器不是convKB吗,最后如何eval的?

@Modberge
Copy link
Collaborator

Modberge commented Jul 26, 2022

在filter protocol情况下,label用来标记当前三元组中所有正确的头实体或尾实体。

目前NeuralKG支持link predication task,详细的eval过程请参照eval_task模块下的link_prediction.py

此外您也可以通过Translating Embeddings for Modeling Multi-relational Data论文了解模型是如何进行链接预测的。

希望这可以帮到您。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants