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

您好我是一名初学者,请问我在colab上使用自己的数据训练完TransH模型后,如何获得相应的embedding?文档中并无详细描述,感谢您的帮助 #23

Closed
AIR-hl opened this issue Mar 24, 2023 · 1 comment

Comments

@AIR-hl
Copy link

AIR-hl commented Mar 24, 2023

No description provided.

@AIR-hl
Copy link
Author

AIR-hl commented Mar 25, 2023

官方示例中给出了获得embedding的代码:
model = torch.load('epoch=xxx-Eval|mrr=x.xxx.ckpt')
rel_emb = model['state_dict']['model.rel_emb.weight']
ent_emb = model['state_dict']['model.ent_emb.weight']

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

1 participant