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

the number of relation #54

Open
Yongquan-He opened this issue Nov 19, 2019 · 2 comments
Open

the number of relation #54

Yongquan-He opened this issue Nov 19, 2019 · 2 comments
Labels

Comments

@Yongquan-He
Copy link

I have 11 relations in my dataset, but I get nun_relations is 24. I know the relation_inverse, but why it is not 22?
I also have another question, the index in str2var['e1'] and str2var['e2_multi1'] same or not, when I do like this?

keys2keys['e1'] = 'e1' # entities
keys2keys['rel'] = 'rel' # relations
keys2keys['rel_eval'] = 'rel' # relations
keys2keys['e2'] = 'e1' # entities
keys2keys['e2_multi1'] = 'e1' # entity
keys2keys['e2_multi2'] = 'e1' # entity
input_keys = ['e1', 'rel', 'rel_eval', 'e2', 'e2_multi1', 'e2_multi2']

@TimDettmers
Copy link
Owner

Yeah, that can be a bit confusing. It is a bit weird software artifact. It is 11 (normal) + 11 (reverse) + 1 OOV relation + 1 "" relation. The last two relations have no effect on training because they are never used. It is an artifact of the vocab class of the spodernet library.

@Moon-xm
Copy link

Moon-xm commented Jun 18, 2021

I found that the number of entities in the calculation is also more than 1OOV entity +1"" entity, and these two parts appear in the first two entity embedding, are they also invalid in the training process? if I want to use conve as decoder, can I directly use self.emb_ e.weight.data [2:] = emb_e.data to replace the entity embedding?

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

No branches or pull requests

3 participants